File Exception Load
File Exception Load
File Exception Load
The exception that is thrown when a managed assembly is found but cannot be loaded.
public ref class FileLoadException : System::IO::IOException
[System.Runtime.InteropServices.ComVisible(true)] [System.Serializable] public class FileLoadException : System.IO.IOException
type FileLoadException = class inherit IOException
Public Class FileLoadException Inherits IOException
Represents the error that occurs when a Assembly file is found but cannot be loaded.
The FileNotFoundException exception is thrown when the file fails to load because it cannot be located. If the file is located, but cannot be loaded due to insufficient permissions, a SecurityException is thrown.
FileLoadException has the default HRESULT of COR_E_FILELOAD, which has the value 0x80131621, but this is not the only possible HRESULT.
If your code does not have PathDiscovery permission, the error message for this exception may only contain file or directory names instead of fully qualified paths.
This exception is not included in the .NET for Windows Store apps or the Portable Class Library, but it is thrown by some members that are. To catch the exception in that case, write a
catch statement for IOException instead.
Make sure that the file is a valid .NET Framework assembly.
This exception is thrown if the file is not a valid .NET Framework assembly. For more information, see Assembly.
Check to make sure an assembly or module was not loaded twice with two different evidences.
Evidence is the set of information that constitutes input to security policy decisions, such as what permissions can be granted to code. For more information, see GacRemove and Evidence
If using the RegisterAssembly or UnRegisterAssembly methods, check to make sure the assembly name is not longer than the system-defined maximum length.
The assembly name's length cannot exceed the system-defined maximum. For more information, see PathTooLongException.
If loading a satellite assembly, make sure the specified CultureInfo matches the file's CultureInfo.
Satellite assemblies contain localized resources which contain non-localizable executable code and resources for a single culture that serve as the default or neutral culture. For more information, see GetSatelliteAssembly.
|Data Data Data Data||
Gets a collection of key/value pairs that provide additional user-defined information about the exception.(Inherited from Exception)
|FileName FileName FileName FileName||
Gets the name of the file that causes this exception.
|FusionLog FusionLog FusionLog FusionLog||
Gets the log file that describes why an assembly load failed.
|HelpLink HelpLink HelpLink HelpLink||
Gets or sets a link to the help file associated with this exception.(Inherited from Exception)
|HResult HResult HResult HResult||
Gets or sets HRESULT, a coded numerical value that is assigned to a specific exception.(Inherited from Exception)
|InnerException InnerException InnerException InnerException||
Gets the Exception instance that caused the current exception.(Inherited from Exception)
|Message Message Message Message||
Gets the error message and the name of the file that caused this exception.
|Source Source Source Source||
Gets or sets the name of the application or the object that causes the error.(Inherited from Exception)
|StackTrace StackTrace StackTrace StackTrace||
Gets a string representation of the immediate frames on the call stack.(Inherited from Exception)
|TargetSite TargetSite TargetSite TargetSite||
Gets the method that throws the current exception.(Inherited from Exception)
|Equals(Object) Equals(Object) Equals(Object) Equals(Object)||
Determines whether the specified object is equal to the current object.(Inherited from Object)
|GetBaseException() GetBaseException() GetBaseException() GetBaseException()||
When overridden in a derived class, returns the Exception that is the root cause of one or more subsequent exceptions.(Inherited from Exception)
|GetHashCode() GetHashCode() GetHashCode() GetHashCode()||
Serves as the default hash function.(Inherited from Object)
|GetObjectData(SerializationInfo, StreamingContext) GetObjectData(SerializationInfo, StreamingContext) GetObjectData(SerializationInfo, StreamingContext) GetObjectData(SerializationInfo, StreamingContext)||
Sets the SerializationInfo with the file name and additional exception information.
|GetType() GetType() GetType() GetType()||
Gets the runtime type of the current instance.(Inherited from Exception)
|MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()||
Creates a shallow copy of the current Object.(Inherited from Object)
|ToString() ToString() ToString() ToString()||
Returns the fully qualified name of the current exception, and possibly the error message, the name of the inner exception, and the stack trace.
|SerializeObjectState SerializeObjectState SerializeObjectState SerializeObjectState||
Occurs when an exception is serialized to create an exception state object that contains serialized data about the exception.(Inherited from Exception)
We'd love to hear your thoughts. Choose the type you'd like to provide:
Our feedback system is built on GitHub Issues. Read more on our blog.