AssemblyLoadContext.LoadFromAssemblyPath(String) Method

Definition

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

C#
public System.Reflection.Assembly LoadFromAssemblyPath(string assemblyPath);

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 argument is null.

A file that was found could not be loaded.

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

The assemblyPath argument is not a valid assembly.

Applies to

Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10

See also