Unable to write to output file '...': System Error &H80070020&
You may receive the error: Unable to write to output file '...': System Error &H80070020& when attempting to build and run your solution in Visual Studio 2003.
This can be caused by a known bug in Microsoft Visual Studio 2003. It is caused by the Intellisense features of the Visual Studio IDE locking the file specified. You also cannot delete the file specified also because it is locked. It is likely to occur when you have multiple projects within a single solution, and one project depends on another.
Workarounds For Error &H80070020&
You can try the following options to fix the problem.
- Switch from Debug to Release mode and back again. (Or vice versa).
- Close and re-load the Visual Studio IDE and your solution
- Close the IDE, delete the obj folder of the project spcified in the error message, then reload the IDE. The obj folder will be rebuilt next time you compile and run your solution. This should fix the problem for a while, but it will probably occur again.
- Set Copy Local to True. Do this is the References section of Solution Explorer in the project or projects that refer to the offending DLL as described in the error message. Then save, exit and reload the solution and try again. This is not ideal as you end of with multiple temporary copies of the DLL everywhere, and the copying slows the build process up slightly, but this appears to be to only proper permanent solution.