【发布时间】:2010-10-30 20:26:44
【问题描述】:
在我的 ASP.NET 应用程序中,我尝试添加另一个目录以复制其中的 DLL。
我发现允许 m 执行此操作的唯一方法是 AppDomain.CurrentDomain.SetShadowCopyPath。
但是,这个方法被标记为Obsolete。 MSDN 有这样的说法
SetShadowCopyPath(String path) 消息:AppDomain.SetShadowCopyPath 已被弃用。请调查 AppDomainSetup.ShadowCopyDirectories 的使用情况。
但是,每当我为其设置值时,AppDomainSetup.ShadowCopyDirectories 属性似乎都不会改变。
AppDomain.CurrentDomain.SetupInformation.ShadowCopyDirectories = "mydirectory;bin";
string test = AppDomain.CurrentDomain.SetupInformation.ShadowCopyDirectories; // returns bin, which was the original directory
它是否有理由不会改变,是否有解决方法?
【问题讨论】:
标签: asp.net appdomain shadow-copy