Visual studio 多行生成事件会导致锁定问题
我有一个带有x项目的VisualStudio解决方案。每个项目都有由两行或多行组成的(后期)生成事件 执行生成事件时,会发生锁定问题:Visual studio 多行生成事件会导致锁定问题,visual-studio,visual-studio-2013,msbuild,post-build-event,build-events,Visual Studio,Visual Studio 2013,Msbuild,Post Build Event,Build Events,我有一个带有x项目的VisualStudio解决方案。每个项目都有由两行或多行组成的(后期)生成事件 执行生成事件时,会发生锁定问题: The specified task executable "cmd.exe" could not be run. The process cannot access the file 'D:\Users\<user>\AppData\Local\Temp\tmpff905f7a0bf94226b86296693df6861c.exec.cmd' b
The specified task executable "cmd.exe" could not be run. The process cannot access the file 'D:\Users\<user>\AppData\Local\Temp\tmpff905f7a0bf94226b86296693df6861c.exec.cmd' because it is being used by another process.
无法运行指定的任务可执行文件“cmd.exe”。进程无法访问文件“D:\Users\\AppData\Local\Temp\tmpff905f7a0bf94226b86296693df6861c.exec.cmd”,因为其他进程正在使用该文件。
我怀疑Visual Studio会将多行写入唯一的临时文件,该文件应由cmd.exe执行。我首先怀疑并行构建之间存在冲突,但由于每个构建似乎都创建了一个唯一的文件,这并不是原因
另一个很好的细节是,有问题的文件在出错后不会被删除。当我打开它时,它是空的
所以
- 为什么会有冲突
- 为什么是空的