I have a project in C# and I get this error every time I try to compile the project:
(Unable to copy file \"obj\\Debug\\Project1.exe\" to \"bin\\Debug
The real problem isn't the error you're getting; it's that the application isn't cleaning up after itself.
It's either holding on to references, not freeing resources, or something else that's causing the process to not end when it's being told to close. Fix up that issue and this problem will resolve itself. We can't really help you with that unless you post your code (and at this point, if you need help with that, you should start a new question).
I had same problem, after read your answers , went to Task Manager
and searched for app.exe
because i believe maybe it doesn't close .
And found it , select it and do END TASK
.my problem solved.
This will Sound crazy, when ever i build the project the error will be displayed and the avast antivirus will show it as malicious attempt and the project does not run.i just simply disable my antivirus and build my solution again the missing .EXE file has been Created and the project has been successfully executed.
Or you can try this
Visual Studio build fails: unable to copy exe-file from obj\debug to bin\debug
If this error was encountered, you can proceed as the following
msbuild.exe
taskexplorer.exe
taskexplorer.exe
task againI can confirm this bug exists in VS 2012 Update 2 also.
My work-around is to:
I don't know if this is relevant or not, but my project uses "Linked" in class files from other projects - it's a Silverlight 5 project and the only way to share a class that is .NET and SL compatible is to link the files.
Something to consider ... look for linked files across projects in a single solution.
for me it was the antivirus. Just add visual studio project or entire parent folder to Antivirus exclusion list or you can also add file extension as exclusion and this method worked for me in visual studio 2010/2012