文件被system进程锁定,不能删除,没有明显用户进程操作此文件。
软件UNLOCKER,WHOLOCKME,LOCK HUNTER之类的,可能需要重启才能解决问题,这在生产环境 中是不可接受的。
能作的还是慢慢搜索可用解决方案。。
然后,找到此个文档,显示了被SYSTEM占用文件的解决办法,并将此归为WIN2008的一个小BUG,但不知道实际效果如何。。:
http://stackoverflow.com/questions/4378192/windows-2008-r2-kernel-system-process-pid-4-is-locking-files-and-folders
Windows 2008 R2 - Kernel (System Process PID=4) is locking files and folders
As Dani has already mentioned in the comment:
It's a bug in Windows 7 and likely in Windows Server 2008 (possibly 64bit versions only). It surfaces when you disable Application Experience service.
Re-enabling this service has fixed this problem for me.
A bit more info here as to why it's causing a problem.
List of other SO questions which seem to be related:
- Visual Studio output file permissions?