Assembly.LoadWithPartialName 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
使用部分名称从应用程序目录或全局程序集缓存加载程序集。
重载
| 名称 | 说明 |
|---|---|
| LoadWithPartialName(String) |
已过时.
已过时.
已过时.
使用部分名称从应用程序目录或全局程序集缓存加载程序集。 |
| LoadWithPartialName(String, Evidence) |
已过时.
使用部分名称从应用程序目录或全局程序集缓存加载程序集。 使用提供的证据加载程序集。 |
注解
Important
方法的 Assembly.LoadWithPartialName 重载已过时,并已保留以实现向后兼容性。 非过时的替代项是 Assembly.Load(String)。
LoadWithPartialName(String)
- Source:
- Assembly.CoreCLR.cs
- Source:
- Assembly.CoreCLR.cs
- Source:
- Assembly.CoreCLR.cs
- Source:
- Assembly.CoreCLR.cs
- Source:
- Assembly.CoreCLR.cs
注意
Assembly.LoadWithPartialName has been deprecated. Use Assembly.Load() instead.
注意
This method has been deprecated. Please use Assembly.Load() instead. https://go.microsoft.com/fwlink/?linkid=14202
注意
This method has been deprecated. Please use Assembly.Load() instead. http://go.microsoft.com/fwlink/?linkid=14202
使用部分名称从应用程序目录或全局程序集缓存加载程序集。
public:
static System::Reflection::Assembly ^ LoadWithPartialName(System::String ^ partialName);
[System.Obsolete("Assembly.LoadWithPartialName has been deprecated. Use Assembly.Load() instead.")]
public static System.Reflection.Assembly? LoadWithPartialName(string partialName);
[System.Obsolete("This method has been deprecated. Please use Assembly.Load() instead. https://go.microsoft.com/fwlink/?linkid=14202")]
public static System.Reflection.Assembly? LoadWithPartialName(string partialName);
[System.Obsolete("This method has been deprecated. Please use Assembly.Load() instead. http://go.microsoft.com/fwlink/?linkid=14202")]
public static System.Reflection.Assembly LoadWithPartialName(string partialName);
public static System.Reflection.Assembly LoadWithPartialName(string partialName);
[System.Obsolete("This method has been deprecated. Please use Assembly.Load() instead. https://go.microsoft.com/fwlink/?linkid=14202")]
public static System.Reflection.Assembly LoadWithPartialName(string partialName);
[<System.Obsolete("Assembly.LoadWithPartialName has been deprecated. Use Assembly.Load() instead.")>]
static member LoadWithPartialName : string -> System.Reflection.Assembly
[<System.Obsolete("This method has been deprecated. Please use Assembly.Load() instead. https://go.microsoft.com/fwlink/?linkid=14202")>]
static member LoadWithPartialName : string -> System.Reflection.Assembly
[<System.Obsolete("This method has been deprecated. Please use Assembly.Load() instead. http://go.microsoft.com/fwlink/?linkid=14202")>]
static member LoadWithPartialName : string -> System.Reflection.Assembly
static member LoadWithPartialName : string -> System.Reflection.Assembly
Public Shared Function LoadWithPartialName (partialName As String) As Assembly
参数
- partialName
- String
程序集的显示名称。
返回
加载的程序集。 如果未 partialName 找到,此方法将 null返回 。
- 属性
例外
参数 partialName 为 null.
该程序集不是当前加载的运行时的有效程序集。
注解
Important
此方法 LoadWithPartialName(String) 已过时,已保留以实现向后兼容性。 非过时的替代项是 Assembly.Load(String)。
使用此方法加载程序集的应用程序将受到这些程序集升级的影响。 因此,请勿使用此方法;重新设计应用程序以使用 Load(String) 方法重载或 LoadFrom(String) 方法重载。
在 .NET Core/5+ 中,目标程序集将加载到当前 AssemblyLoadContext 或 AssemblyLoadContext.CurrentContextualReflectionContext(如果已设置)。
此方法首先调用 Load。 如果未找到程序集,此方法将从具有相同简单名称且版本号最高的全局程序集缓存中返回程序集。
另请参阅
适用于
LoadWithPartialName(String, Evidence)
注意
This method has been deprecated. Please use Assembly.Load() instead. http://go.microsoft.com/fwlink/?linkid=14202
使用部分名称从应用程序目录或全局程序集缓存加载程序集。 使用提供的证据加载程序集。
public:
static System::Reflection::Assembly ^ LoadWithPartialName(System::String ^ partialName, System::Security::Policy::Evidence ^ securityEvidence);
public static System.Reflection.Assembly LoadWithPartialName(string partialName, System.Security.Policy.Evidence securityEvidence);
[System.Obsolete("This method has been deprecated. Please use Assembly.Load() instead. http://go.microsoft.com/fwlink/?linkid=14202")]
public static System.Reflection.Assembly LoadWithPartialName(string partialName, System.Security.Policy.Evidence securityEvidence);
static member LoadWithPartialName : string * System.Security.Policy.Evidence -> System.Reflection.Assembly
[<System.Obsolete("This method has been deprecated. Please use Assembly.Load() instead. http://go.microsoft.com/fwlink/?linkid=14202")>]
static member LoadWithPartialName : string * System.Security.Policy.Evidence -> System.Reflection.Assembly
Public Shared Function LoadWithPartialName (partialName As String, securityEvidence As Evidence) As Assembly
参数
- partialName
- String
程序集的显示名称。
- securityEvidence
- Evidence
加载程序集的证据。
返回
加载的程序集。 如果未 partialName 找到,此方法将 null返回 。
- 属性
例外
程序集或模块加载了两次,其中包含两组不同的证据。
参数 partialName 为 null.
该程序集不是当前加载的运行时的有效程序集。
注解
Important
此方法 LoadWithPartialName(String, Evidence) 已过时,已保留以实现向后兼容性。 非过时的替代项是 Assembly.Load(String)。
证据是构成安全策略决策输入的信息集,例如可以向代码授予哪些权限。
使用此方法加载程序集的应用程序将受到这些程序集升级的影响。 因此,请勿使用此方法;重新设计应用程序以使用 Load 该方法或 LoadFrom 方法。
此方法首先调用 Load。 如果未找到程序集,此方法将从具有相同简单名称且版本号最高的全局程序集缓存中返回程序集。