AppDomain.SetCachePath(String) 方法

定义

警告

此 API 现已过时。

确定指定目录路径为对程序集进行影像复制的位置。Establishes the specified directory path as the location where assemblies are shadow copied.

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

参数

path
String

到卷影副本位置的完全限定路径。The fully qualified path to the shadow copy location.

实现

属性

异常

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

注解

如果未设置 ApplicationName 属性,则忽略缓存路径。The cache path is ignored if the ApplicationName property is not set. 请参阅 AppDomainSetup.CachePath 属性。See the AppDomainSetup.CachePath property.

有关卷影复制的详细信息,请参阅卷影复制程序集For more information on shadow copying see Shadow Copying Assemblies.

安全性

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

适用于

另请参阅