A fellow emailed me about the troubles he was having with his VS.NET solution. He's trying to build into a shared binaries folder and is using direct Assembly references (rather than project references.)
In fact, it appears that Intellisense is locking his assemblies just long enough to get one of the dreaded:
- Could not copy temporary files to the output directory.
- The file 'assembly name' cannot be copied to the run directory. The process cannot access the file because it is being used by another process.
- error CS0016: Could not write to output file 'fully qualified path of an assembly' -- 'The process cannot access the file because it is being used by another process. '
- Cannot delete the project output: is the file read-only? A failure occurred while attempting to start the application.
And that sucks. Basically if you turn Copy Local to False and compile to one folder, you're screwed.
The moral? We use NAnt for all builds. It's fairly simple, repeatable, and IJW. Otherwise, if your goal is to get all files to a shared bin, use a Post Build Event.
Hosting By