Load Context. Load From Assembly Name(AssemblyName) Method
Resolves and loads an assembly given its AssemblyName.
public: System::Reflection::Assembly ^ LoadFromAssemblyName(System::Reflection::AssemblyName ^ assemblyName);
public System.Reflection.Assembly LoadFromAssemblyName (System.Reflection.AssemblyName assemblyName);
member this.LoadFromAssemblyName : System.Reflection.AssemblyName -> System.Reflection.Assembly
The object that describes the assembly to load.
The loaded assembly, or throws.
assemblyName is not found.
assemblyName is not a valid assembly.
An assembly or module was loaded which did not match the
The method calls Load(AssemblyName).
Load(AssemblyName) must not call this method to prevent recursive stack overflow.
Unless the assembly is loaded or an exception is thrown, the method attempts to load the assembly in the default AssemblyLoadContext.
Unless the assembly is loaded or an exception is thrown, the method fires the Resolving event.
Unless the assembly is loaded or an exception is thrown, the method fires the AssemblyResolve event.
FileLoadException is thrown if
assemblyRef specifies the full assembly name, and the first assembly that matches the simple name has a incompatible version or culture. The loader does not continue probing for other assemblies that match the simple name.
Each AssemblyLoadContext can load only:
- One version of an executable assembly.
- One version of a satellite assembly for each culture.