MetadataLoadContext.LoadFromAssemblyName Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
LoadFromAssemblyName(AssemblyName) |
Resolves the supplied assembly name to an assembly. If an assembly was previously bound to this name, that assembly is returned. Otherwise, the MetadataLoadContext calls the specified MetadataAssemblyResolver. |
LoadFromAssemblyName(String) |
Resolves the supplied assembly name to an assembly. If an assembly was previously bound to this name, that assembly is returned. Otherwise, the MetadataLoadContext calls the specified MetadataAssemblyResolver. |
LoadFromAssemblyName(AssemblyName)
- Source:
- MetadataLoadContext.Apis.cs
- Source:
- MetadataLoadContext.Apis.cs
- Source:
- MetadataLoadContext.Apis.cs
Resolves the supplied assembly name to an assembly. If an assembly was previously bound to this name, that assembly is returned. Otherwise, the MetadataLoadContext calls the specified MetadataAssemblyResolver.
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
Public Function LoadFromAssemblyName (assemblyName As AssemblyName) As Assembly
Parameters
- assemblyName
- AssemblyName
An AssemblyName instance.
Returns
An Assembly instance.
Exceptions
The resolver returns null
.
Remarks
Note that the behavior of this method matches the behavior of the AssemblyLoadContext.LoadFromAssemblyName resolve event, but does not match the behavior of Assembly.ReflectionOnlyLoad. (The latter gives up without raising its resolve event.)
Applies to
LoadFromAssemblyName(String)
- Source:
- MetadataLoadContext.Apis.cs
- Source:
- MetadataLoadContext.Apis.cs
- Source:
- MetadataLoadContext.Apis.cs
Resolves the supplied assembly name to an assembly. If an assembly was previously bound to this name, that assembly is returned. Otherwise, the MetadataLoadContext calls the specified MetadataAssemblyResolver.
public:
System::Reflection::Assembly ^ LoadFromAssemblyName(System::String ^ assemblyName);
public System.Reflection.Assembly LoadFromAssemblyName (string assemblyName);
member this.LoadFromAssemblyName : string -> System.Reflection.Assembly
Public Function LoadFromAssemblyName (assemblyName As String) As Assembly
Parameters
Returns
An Assembly instance.
Exceptions
The resolver returns null
.
Remarks
Note that the behavior of this method matches the behavior of the AssemblyLoadContext.LoadFromAssemblyName resolve event but does not match the behavior of Assembly.ReflectionOnlyLoad. (The latter gives up without raising its resolve event.)