System.AppDomain.SetCachePath 方法

方法描述

确定指定目录路径为对程序集进行影像复制的位置。

语法定义(C# System.AppDomain.SetCachePath 方法 的用法)

[ObsoleteAttribute("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
)

参数/返回值

参数值/返回值 参数类型/返回类型 参数描述/返回描述
path System-String 到影像副本位置的完全限定路径。
返回值 void

提示和注释

如果没有设置 ApplicationName 属性,则忽略缓存路径。 请参见 AppDomainSetup.CachePath 属性。

有关影像复制的更多信息,请参见影像复制程序集。

System.AppDomain.SetCachePath 方法例子


异常

异常 异常描述
AppDomainUnloadedException 尝试对已卸载的应用程序域进行操作。

命名空间

namespace: System

程序集: mscorlib(在 mscorlib.dll 中)

版本信息

.NET Framework 受以下版本支持:1.1、1.0 在 4 中过时(编译器警告) 在 3.5 中过时(编译器警告) 在 3.5 SP1 中过时(编译器警告) 在 3.0 中过时(编译器警告) 在 3.0 SP1 中过时(编译器警告) 在 3.0 SP2 中过时(编译器警告) 在 2.0 中过时(编译器警告) 在 2.0 SP1 中过时(编译器警告) 在 2.0 SP2 中过时(编译器警告) .NET Framework Client Profile 在 4 中过时(编译器警告) 在 3.5 SP1 中过时(编译器警告)

适用平台

Windows 7, Windows Vista SP1 或更高版本, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008(不支持服务器核心), Windows Server 2008 R2(支持 SP1 或更高版本的服务器核心), Windows Server 2003 SP2 .NET Framework 并不是对每个平台的所有版本都提供支持。有关支持的版本的列表,请参见.NET Framework 系统要求。