I have a Visual Studio solution with x projects. Each project has (post) build events consisting of two or more lines.
When the build events are executed, a locking problem occurs:
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.
I suspect that Visual Studio writes the multiple lines to the unique temporary file which should be executed by cmd.exe. I first suspected there was a conflict between parallel builds, but since each build seems to create a unique file, that cannot be the cause.
Anohter nice detail is that the file in question, is not deleted after the error. When I open it, it is empty.
So...
- Why is there a conflict?
- Why is it empty?