装配文件未锁定 [英] Assembly Files not locked
问题描述
我正在编写一个可以动态更新汇编文件的应用程序。我的更新过程通过在主应用程序关闭后将更新存储在准备由引导程序应用程序部署的临时目录中来处理文件被锁定的情况。
但是,我看到的行为是程序集文件没有被锁定,事实上,当我的程序运行时,我可以进入文件资源管理器并删除所有程序程序集。
I'm writing an application whose assembly files can be updated dynamically. My update process handles the case where files are locked, by storing updates in a temporary directory ready to to be deployed by a bootstrap app after the main application closes. However, the behaviour I'm seeing is that the assembly files are NOT locked, and in fact, while my program is running, I can go into File Explorer and delete all the program assemblies.
显然有一些正在进行的程序集文件的阴影复制,但我不想要这种行为。有什么方法可以防止这种情况吗?或者我是否必须手动锁定文件?
There is obviously some shadow copying of the assembly files going on but I don't want this behaviour. Is there any way to prevent this? or do I have to manually put a lock on the files?
我们非常感谢任何帮助。
Any help would be much appreciated.
Kevan
推荐答案
您使用的是哪种操作系统?
Which operating system are you using?
这篇关于装配文件未锁定的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!