Antlr4.StringTemplate.dll被另一个进程锁定

时间:2015-01-01 15:06:37

标签: dll jenkins robocopy

我有一个名为Antlr4.StringTemplate.dll的DLL。当我尝试将此文件从Jenkins CI从一台服务器复制到另一台服务器时,我不断收到以下错误:

Waiting 30 seconds... Retrying...
    Newer             296448    Antlr4.StringTemplate.dll
2015/01/01 20:32:13 ERROR 32 (0x00000020) Copying File C:\Users\Administrator\.jenkins\workspace\BuildCode\src\CodeScheduler\bin\release\Antlr4.StringTemplate.dll
The process cannot access the file because it is being used by another process.

我尝试使用ProcessExplorer找出锁定文件的进程。发现它是w3wp.exe。我停止了#34;万维网发布服务"现在ProcessExplorer没有显示使用该文件的任何进程。但是在robocopy的时候我仍然会遇到上述错误。我有什么遗失的东西吗?

1 个答案:

答案 0 :(得分:0)

我是通过Jenkins节点上的'groovy console'完成的。

println "taskkill /f /im example.exe".execute().text
println "tasklist".execute().text