locked
Build fails when trying to debug program RRS feed

  • Question

  • I'm developing a C# application in Visual Studio.  After adding some new lines to the code, I suddenly get build errors even though the code is correct.   Seems to be related to the debugger.  If i try release instead of debug, it seems to work.

    I tried deleting all the files in bin\Debug ... but no luck,  still the same error.

    Any suggestions welcome.

    Severity Code Description Project File Line
    Warning Could not copy "obj\Debug\WindowsFormsApplication2.exe" to "bin\Debug\WindowsFormsApplication2.exe". Beginning retry 10 in 1000ms. Could not find file 'obj\Debug\WindowsFormsApplication2.exe'. WindowsFormsApplication2

    Severity Code Description Project File Line

    Warning Could not copy "obj\Debug\WindowsFormsApplication2.exe" to "bin\Debug\WindowsFormsApplication2.exe". Beginning retry 10 in 1000ms. Could not find file 'obj\Debug\WindowsFormsApplication2.exe'. WindowsFormsApplication2
    Severity Code Description Project File Line
    Error Unable to copy file "obj\Debug\WindowsFormsApplication2.exe" to "bin\Debug\WindowsFormsApplication2.exe". Could not find file 'obj\Debug\WindowsFormsApplication2.exe'. WindowsFormsApplication2


    Thursday, October 1, 2015 2:45 PM

Answers

  • Hi TechGeezer52,

    >> After adding some new lines to the code, I suddenly get build errors even though the code is correct.

    (1) Before you debug your app, please clean and rebuild the whole solution, how about the result?

    (2) Just comment out the code you added, and then clean and rebuild your solution, compiled it again, how about the result? If it worked well, I doubt that it would be related to the code added by you.

    (3) Please run your VS as the admin.

    (4) Please delete the \bin\debug folder, and then reclean and rebuild your project again. Note: You could take a backup for your project before you delete the folder.

    Best Regards,

    Jack


    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, October 5, 2015 3:29 AM