AssemblyLoadContext.LoadFromAssemblyPath(String) AssemblyLoadContext.LoadFromAssemblyPath(String) AssemblyLoadContext.LoadFromAssemblyPath(String) AssemblyLoadContext.LoadFromAssemblyPath(String) Method

定义

加载指定路径上的程序集文件的内容。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

参数

assemblyPath
String String String String

要加载的文件的完全限定路径。The fully qualified path of the file to load.

返回

加载的程序集。The loaded assembly.

异常

assemblyPath 参数不是绝对路径。The assemblyPath argument is not an absolute path.

assemblyPath 参数为 nullThe assemblyPath parameter is null.

无法加载已找到的文件。A file that was found could not be loaded.

assemblyPath 参数为空字符串 ("") 或不存在。The assemblyPath parameter is an empty string ("") or does not exist.

assemblyPath 不是有效的程序集。assemblyPath is not a valid assembly.

适用于