I've written a PowerShell script to build several .net solutions one after the other. It simply makes several calls to tfget (to get latest) followed by devenv.exe (to build the .sln files).
Here's the code:
tfget -item $SolutionPath -overwrite -recurse -ev +errors
...
$out = invoke-expression "devenv.com /rebuild debug $SolutionPath"
Almost every time I run the script one of the solutions fails to build I get an error from CSC.exe (?) saying:
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?