1 Attachment(s)
[RESOLVED] Compiler cannot copy the .exe file from obj\x86\Debug folder to \bin folder
When I compile my project, I get the following error:
Code:
Could not copy "obj\x86\Debug\Vehicle Tracker.exe" to "bin\Debug\Vehicle Tracker.exe". Beginning retry 1 in 1000ms. The process cannot access the file 'bin\Debug\Vehicle Tracker.exe' because it is being used by another process.
The compiler makes 10 attempts to copy the .exe file from the obj\x86\Debug folder to the bin\Debug folder, then stops the compilation process.
The way I work around this error is to do the following:
1. Close VS2010.
2. Delete the project's \bin folder.
3. Restart VS2010.
4. Compile the project.
There must be a better way. Can someone please help me resolve this error?
Thanks.
Re: Compiler cannot copy the .exe file from obj\x86\Debug folder to \bin folder
I have tried 2 approaches to fix this issue. First, I tried to repair my VS2010 installation. After completing the repair and restarting my computer the problem copying the .exe file to the bin\Debug folder still exists. Next, I uninstalled VS2010 and deleted the "D:\Program Files (x86)\Microsoft Visual Studio 10.0" folder. Then I reinstalled VS2010 via the original CD-ROM media (from Microsoft). After restarting my computer the problem copying the .exe file to the bin\Debug folder is gone.
So I'm going to mark this thread "Resolved".
Re: [RESOLVED] Compiler cannot copy the .exe file from obj\x86\Debug folder to \bin f
It'll happen again... when it does, try this instead:
1) right-click the solution in the solution explorer, select Clean Solution...
now rebuild.
Done.
What happens sometimes, no one seems to know when or why, the file becomes locked, and when it does, it's usually a simple matter of deleting the bin & obj folders, which is what hte clean process does. If that doesn't work, or it too errors out, simply close VB, delete the folders by hand. Either way, that should solve the issue w/o re-installing VS.
-tg
1 Attachment(s)
Re: [RESOLVED] Compiler cannot copy the .exe file from obj\x86\Debug folder to \bin f
You're right, the error is back :(.
Quote:
right-click the solution in the solution explorer, select Clean Solution...
Can't see the "solution" in the Solution Explorer...
Attachment 136133
My project is named "Vehicle Tracker" and that is the first row of the Solution Explorer. When I right-click it, there is a "Clean" item in the pop-up context menu. Clicking this item does not delete the bin and obj folders.
So I'm assuming that the "solution" is the project name, if not then what am I missing?
Re: [RESOLVED] Compiler cannot copy the .exe file from obj\x86\Debug folder to \bin f
That's because it's a single project solution. In this case just right click on the project and clean that.