AppDomain.AppendPrivatePath(String) 方法

定义

警告

此 API 现已过时。

将指定的目录名追加到专用路径列表。Appends the specified directory name to the private path list.

public:
 virtual void AppendPrivatePath(System::String ^ path);
[System.Obsolete("AppDomain.AppendPrivatePath has been deprecated. Please investigate the use of AppDomainSetup.PrivateBinPath instead.")]
[System.Obsolete("AppDomain.AppendPrivatePath has been deprecated. Please investigate the use of AppDomainSetup.PrivateBinPath instead. https://go.microsoft.com/fwlink/?linkid=14202")]
[System.Security.SecurityCritical]
[System.Obsolete("AppDomain.AppendPrivatePath has been deprecated. Please investigate the use of AppDomainSetup.PrivateBinPath instead. https://go.microsoft.com/fwlink/?linkid=14202")]
[System.Obsolete("AppDomain.AppendPrivatePath has been deprecated. Please investigate the use of AppDomainSetup.PrivateBinPath instead. http://go.microsoft.com/fwlink/?linkid=14202")]
public void AppendPrivatePath (string path);
abstract member AppendPrivatePath : string -> unit
override this.AppendPrivatePath : string -> unit
Public Sub AppendPrivatePath (path As String)

参数

path
String

要追加到专用路径的目录名称。The name of the directory to be appended to the private path.

实现

属性

异常

在卸载的应用程序域上尝试该操作。The operation is attempted on an unloaded application domain.

注解

不建议使用此属性,因为它可能会在已加载程序集之后更改其探测路径。The use of this property is not recommended, because it might change the probing path for assemblies after they have already been loaded. 改用 AppDomainSetup.PrivateBinPath 属性。Use the AppDomainSetup.PrivateBinPath property instead.

专用路径(或相对搜索路径)是相对于基目录的路径,在该路径中,程序集冲突解决程序对专用程序集进行探测。The private path, or relative search path, is the path relative to the base directory where the assembly resolver probes for private assemblies.

安全性

SecurityCriticalAttribute
需要对直接调用方的完全信任。Requires full trust for the immediate caller. 部分受信任的或透明的代码不能使用此成员。This member cannot be used by partially trusted or transparent code.

适用于