AssemblyLoadContext.LoadFromAssemblyPath(String) Method

Definition

Loads the contents of an assembly file on the specified path.

public:
 System::Reflection::Assembly ^ LoadFromAssemblyPath(System::String ^ assemblyPath);
public System.Reflection.Assembly LoadFromAssemblyPath (string assemblyPath);
member this.LoadFromAssemblyPath : string -> System.Reflection.Assembly
Public Function LoadFromAssemblyPath (assemblyPath As String) As Assembly

Parameters

assemblyPath
String

The fully qualified path of the file to load.

Returns

The loaded assembly.

Exceptions

The assemblyPath argument is not an absolute path.

The assemblyPath parameter is null.

A file that was found could not be loaded.

The assemblyPath parameter is an empty string ("") or does not exist.

assemblyPath is not a valid assembly.

Applies to