Answered by:
Visual Studio 2010 unable to re-build

-
Hi All,
I have just got a new laptop for development running Windows 7, installed VS2010 Premium and then downloaded code from TFS.
First time building and running was fine, however I was not able to build after code changes unless I re-started VS2010.
The warning and error I got are:
Warning 1 - Unable to delete file "F:\TFS\PIMS\PIMS\bin\Debug\PIMS.exe". Access to the path 'F:\TFS\PIMS\PIMS\bin\Debug\PIMS.exe' is denied.
Error 19 - Could not copy "obj\Debug\PIMS.exe" to "bin\Debug\PIMS.exe". Exceeded retry count of 10. Failed
Error 20 - Unable to copy file "obj\Debug\PIMS.exe" to "bin\Debug\PIMS.exe". The process cannot access the file 'bin\Debug\PIMS.exe' because it is being used by another process.
Does anyone have any solution for this?
Novian
- Moved by 宝宝徐Microsoft contingent staff, Moderator Tuesday, August 09, 2016 5:45 AM
Question
Answers
All replies
-
Hi Novian,
Thank you for your post.
Firstly, we should check if the cause is related to your VS or the project itself.
How about creating a new project the same type as the error one, do some code changes to see if you could rebuild successfully?
Or checking out another project from TFS, do the same steps as before.
If both could build smoothly, the root cause is pending on the project.
>>Unable to delete file "F:\TFS\PIMS\PIMS\bin\Debug\PIMS.exe". Access to the path 'F:\TFS\PIMS\PIMS\bin\Debug\PIMS.exe' is denied.
According to this error information, some files are contentious。
It could be fixed by deleting the contentious files from bin folder and rebuilding the project
Make sure that the folder is NOT Read-Only and rebuild the solution
Please refer to:
http://stackoverflow.com/questions/7130136/unable-to-copy-file-access-to-the-path-is-denied
Best Regards,
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.- Edited by 宝宝徐Microsoft contingent staff, Moderator Tuesday, August 09, 2016 6:43 AM
-
Hi,
First check using System Task Manager that there are no instances of the application running in background. If you see PIMS.exe running , exit/kill the process.
Also, check if any Anti Virus installed on the box is not trying to scan your application. At times, I have seen newly created executable being scanned by the Anti Virus - blocking access to it by other applications.
Please mark the post as helpful / answer if this fixes your issue.
Cheers !
Chirag Dave
- Proposed as answer by .ChiragDave Tuesday, August 09, 2016 11:09 AM
- Marked as answer by 宝宝徐Microsoft contingent staff, Moderator Monday, August 15, 2016 2:15 AM
- Unmarked as answer by Novian Monday, August 22, 2016 6:08 AM
-
-
Hi Novian,
Glad to hear you have had your issue resolved. And thanks for sharing us your solution here.
Have a nice day:)
Best Regards,
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.