Why does PowerShell fail to build my .net solutions? ("file is being used by another process")
Posted
by urig
on Stack Overflow
See other posts from Stack Overflow
or by urig
Published on 2010-04-01T13:27:37Z
Indexed on
2010/04/01
13:33 UTC
Read the original article
Hit count: 396
I've written a PowerShell script to build several .net solutions one after the other. It simply makes several calls to csc.exe to build the .sln files.
Almost every time I run the script one of the solutions fails to build and CSC.exe reports:
error CS1606: Assembly signing failed; output may not be signed -- The process cannot access the file because it is being used by another process.
This happens even though I've closed all instances of Visual Studio holding these solutions and I've none of their exes running on mu machine.
A similar batch file that I've written works just fine. It's only PowerShell that complains about the file being used by another process.
How can avoid having this happen? Are there any better examples out there of building .net solutions through PowerShell?
© Stack Overflow or respective owner