none
Visual Studio 2010 unable to re-build

    Question

  • 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

    Monday, August 08, 2016 2:15 AM

Answers

  • None of the answers fix the problem.

    However, I found a work around by unticking the Enable the visual studio hosting process under project | Debug setting.

    • Marked as answer by Novian Monday, August 22, 2016 6:15 AM
    Monday, August 22, 2016 6:14 AM

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.


    Tuesday, August 09, 2016 6:41 AM
    Moderator
  • 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


    Tuesday, August 09, 2016 11:09 AM
  • None of the answers fix the problem.

    However, I found a work around by unticking the Enable the visual studio hosting process under project | Debug setting.

    • Marked as answer by Novian Monday, August 22, 2016 6:15 AM
    Monday, August 22, 2016 6:14 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.

    Monday, August 22, 2016 6:20 AM
    Moderator