什么ShadowCopyFiles财产的AppDomain呢? [英] What does ShadowCopyFiles property in appdomain does?

查看:96
本文介绍了什么ShadowCopyFiles财产的AppDomain呢?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道,当你设置为true,将卷影副本的files.But什么卷影副本的意思是,为什么我们要卷影复制文件?

I know when you set to true ,it will shadow copy the files.But what does shadow copy mean and why we need to shadow copy files?

推荐答案

卷影复制创建您引用的组件的副本。

Shadow copy creates a copy of the assembly you are referencing.

这样做的原因是,净(更准确的Windows)无法卸载,一旦加载的过程中(部分)组件。正因为如此,你永远无法替代的组件,而无需关闭整个过程,因为该文件仍然锁定操作系统。

The reason for this is that .Net (more exactly Windows) cannot unload (some) assemblies within a process once loaded. Because of this you could never replace an assembly without shutting down the entire process because the file remains locked by the OS.

不过,如果你有一个卷影副本的.Net实际使用的加载你的课程,你可以替换原来的.dll文件,并只卷影副本(也没人关心有关)保持锁定。

However if you have a shadow copy .Net actually uses that to load your classes you can replace the original .dll file and only the shadow copy (that nobody 'cares' about) stays locked.

这是在某些环境中尤为重要(如Web服务器,你显然不希望关闭整个服务器只运行一些网络应用程序的新版本)。

This is especially important in some environments (e.g. a webserver where you obviously don't want to shut down the entire server just to run a new version of some web-application).

这篇关于什么ShadowCopyFiles财产的AppDomain呢?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆