AssemblyLoadContext.LoadFromAssemblyPath(String) Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Charge le contenu d’un fichier d’assembly sur le chemin d’accès spécifié.
public:
System::Reflection::Assembly ^ LoadFromAssemblyPath(System::String ^ assemblyPath);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Types and members the loaded assembly depends on might be removed")]
public System.Reflection.Assembly LoadFromAssemblyPath(string assemblyPath);
public System.Reflection.Assembly LoadFromAssemblyPath(string assemblyPath);
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Types and members the loaded assembly depends on might be removed")>]
member this.LoadFromAssemblyPath : string -> System.Reflection.Assembly
member this.LoadFromAssemblyPath : string -> System.Reflection.Assembly
Public Function LoadFromAssemblyPath (assemblyPath As String) As Assembly
Paramètres
- assemblyPath
- String
Chemin complet du fichier à charger.
Retours
Assembly chargé.
- Attributs
Exceptions
L’argument assemblyPath n’est pas un chemin absolu.
L’argument assemblyPath est null.
Impossible de charger un fichier trouvé.
L’argument assemblyPath est une chaîne vide (« ») ou n’existe pas.
L’argument assemblyPath n’est pas un assembly valide.
Remarques
Lorsque cette méthode est appelée sur le Default contexte, si le nom de l’assembly correspond à un assembly qui fait partie du chemin d’accès de détection par défaut, l’assembly à partir du chemin d’accès de détection par défaut est chargé au lieu de l’assembly au niveau du chemin spécifié. Pour plus d’informations sur la détection par défaut, consultez l’algorithme de chargement d’assembly managé.