When compiling a project for the second time I get the following error message. I have to close down VS 2010 and it compiles when reloaded. If I make a change then the problem c
In my case, this error was being caused by Microsoft Security Essentials scanning the file as soon as Visual Studio saved it before a compile. The compiler then tried to access the file and would find it locked by MSE. Adding the Visual Studio projects directory to the exclusions list made the error go away.