I have a visual studio solution whith (roughly speaking) the following layout:
Common.dll
Proja (project which references Common.dll)
Projb (project which references Common.dll)
Main (Executable which references proja and projb)
The problem is that sometimes when I compile I get
11>Proja : error PRJ0008 : Could not delete file 'c:\Blah blah blah\Main\Release\Ionic.Zip.dll'.
…because (I think) both proja and projb are being built at once. Since they both end up in the same output directory I’m guessing one thread attempts to delete the Common.dll while the other one is using it or something along those lines.
Now if it’s just me compiling the project, that’s fine as I can always hit the rebuild button and after a couple of fails it appears the sort itself out. The more difficult issue is that we’re moving to using Jenkins and that keeps failing.
What’s the right way to do this?
Took a bit of fiddling around, but the bit that seemed to sort the issue out in the end was changing the intermediate and output directory of every project to
$(ProjectDir)\$(ConfigurationNameseems to have solved the issue. I can run MSBuild with s many processors as I like and it still succeeds 🙂