AssemblyLoadContext.LoadFromNativeImagePath(String, String) 方法

定義

載入指定路徑上受控組件檔案的原生映像內容。

public:
 System::Reflection::Assembly ^ LoadFromNativeImagePath(System::String ^ nativeImagePath, System::String ^ assemblyPath);
public System.Reflection.Assembly LoadFromNativeImagePath (string nativeImagePath, string? assemblyPath);
public System.Reflection.Assembly LoadFromNativeImagePath (string nativeImagePath, string assemblyPath);
member this.LoadFromNativeImagePath : string * string -> System.Reflection.Assembly
Public Function LoadFromNativeImagePath (nativeImagePath As String, assemblyPath As String) As Assembly

參數

nativeImagePath
String

要載入的完整檔案路徑。

assemblyPath
String

所要載入檔案之 IL 版本的完整檔案路徑或 null

傳回

載入的組件。

例外狀況

nativeImagePath 引數不是絕對路徑。

assemblyPath 引數不是絕對路徑。

nativeImagePath 引數為 null

無法載入找到的檔案。

nativeImagePath 變數是空字串 (「」) 或不存在。

assemblyPath 變數不是有效的元件。

備註

Managed 元件的原生映射已預先抖動,以優化在特定平臺上執行。

元件路徑是指元件 IL 版本的路徑。 這是選擇性引數,因為 IL 通常包含在原生映射中。 如果找不到原生映射,執行時間可以使用它做為後援。

適用於

另請參閱