问题
i have a visual studio 2010 , when i run project normal runs, and when i close window then make some changes and run, they says "Error 5 Unable to copy file "obj\x86\Debug\Passport.exe" to "bin\Debug\Passport.exe". The process cannot access the file 'bin\Debug\Passport.exe' because it is being used by another process. Passport"
as i see in Passport.exe still in task manager. why? (when i end that process again i can build project)
NOTE for my other projects no that problem, only for this.
Many thanks who can help :)
回答1:
There are many reasons why this could happen, but basically it boils down to your passport process or a child process of it, not closing as soon as you "close the window".
Things to check: 1. Extra threads not being terminated (worker threads not complete etc.) 2. Debug, breakpoints causing closure process to hang.
First I would remove all breakpoints and then look at what processes you may be running that could be holding up process closure e.g. worker threads, file writing, hardware access.
Sometimes it's best to kill processes using the stop button in Visual Studio.
来源:https://stackoverflow.com/questions/7874885/visual-studio-process-unable-to-copy-file