AssemblyLoadContext.LoadFromNativeImagePath(String, String) Método
Definição
Importante
Algumas informações dizem respeito a um produto pré-lançado que pode ser substancialmente modificado antes de ser lançado. A Microsoft não faz garantias, de forma expressa ou implícita, em relação à informação aqui apresentada.
Carrega o conteúdo da imagem nativa de um ficheiro assembly gerido no caminho especificado.
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
Parâmetros
- nativeImagePath
- String
O caminho totalmente qualificado do ficheiro para carregar.
- assemblyPath
- String
O caminho totalmente qualificado da versão IL do ficheiro para carregar, ou null.
Devoluções
O conjunto carregado.
- Atributos
Exceções
O nativeImagePath argumento não é um caminho absoluto.
O assemblyPath argumento não é um caminho absoluto.
O nativeImagePath argumento é null.
Um ficheiro encontrado não pôde ser carregado.
O nativeImagePath argumento é uma cadeia vazia ("") ou não existe.
O assemblyPath argumento não é uma assembleia válida.
Observações
A imagem nativa de um assembly gerido é pré-jitada para otimizar a execução numa plataforma específica.
O caminho de montagem refere-se ao caminho para a versão IL da montagem. É um argumento opcional, pois o IL é tipicamente incluído na imagem nativa. Pode ser usado pelo tempo de execução como um plano B caso a imagem nativa não seja encontrada.