AssemblyLoadContext.LoadFromNativeImagePath(String, String) Metodo

Definizione

Carica il contenuto dell'immagine nativa di un file di assembly gestito nel percorso specificato.

public:
 System::Reflection::Assembly ^ LoadFromNativeImagePath(System::String ^ nativeImagePath, System::String ^ assemblyPath);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Types and members the loaded assembly depends on might be removed")]
public System.Reflection.Assembly LoadFromNativeImagePath(string nativeImagePath, string? assemblyPath);
public System.Reflection.Assembly LoadFromNativeImagePath(string nativeImagePath, string assemblyPath);
public System.Reflection.Assembly LoadFromNativeImagePath(string nativeImagePath, string? assemblyPath);
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Types and members the loaded assembly depends on might be removed")>]
member this.LoadFromNativeImagePath : string * string -> System.Reflection.Assembly
member this.LoadFromNativeImagePath : string * string -> System.Reflection.Assembly
Public Function LoadFromNativeImagePath (nativeImagePath As String, assemblyPath As String) As Assembly

Parametri

nativeImagePath
String

Percorso completo del file da caricare.

assemblyPath
String

Percorso completo della versione IL del file da caricare o null.

Valori restituiti

Assembly caricato.

Attributi

Eccezioni

L'argomento nativeImagePath non è un percorso assoluto.

L'argomento assemblyPath non è un percorso assoluto.

L'argomento nativeImagePath è null.

Impossibile caricare un file trovato.

L'argomento nativeImagePath è una stringa vuota ("") o non esiste.

L'argomento assemblyPath non è un assembly valido.

Commenti

L'immagine nativa di un assembly gestito è pre-jitted per ottimizzare l'esecuzione in una piattaforma specifica.

Il percorso dell'assembly fa riferimento al percorso della versione IL dell'assembly. Si tratta di un argomento facoltativo perché il livello di integrazione è in genere incluso nell'immagine nativa. Può essere usato dal runtime come fallback se l'immagine nativa non viene trovata.

Si applica a

Vedi anche