Unable to copy a file from obj\Debug to bin\Debug

后端 未结 30 1451
清歌不尽
清歌不尽 2020-12-02 12:04

I have a project in C# and I get this error every time I try to compile the project:

(Unable to copy file \"obj\\Debug\\Project1.exe\" to \"bin\\Debug

30条回答
  •  感动是毒
    2020-12-02 12:47

    This happened to me at VS 2010 and Win 7.. Case :

    • I can not Rebuild with Debug Configuration manager, but I can rebuild with Release Configuration manager

    debug

    What I have tried:

    • Check my account type at control panel - user account --> My Account is Administrator

    cpanel

    • Set the bin folder not read only

    not read only

    • Add security at bin folder to Everyone

    everyone

    • stop the iis server

    iis stop

    • Stop antivirus, check ridiculous running program using task manager and ProcessExplorer

    • run VS as administrator

    If All that way is still not working.

    Then, the last way to try:

    • close solution
    • close visual studio
    • start - shutdown
    • press power button to turn on the computer
    • login to your account which has administrator previlege at user type
    • reopen solution
    • rebuild
    • that way working. All people call this way as Reset Computer

提交回复
热议问题