Unable to copy file - access to the path is denied

后端 未结 30 1123
死守一世寂寞
死守一世寂寞 2020-11-30 19:05

I am using Visual Studio 2005. After taking code from version control first, the c#.net application runs correctly. But, after doing some modifications, when I build I am

相关标签:
30条回答
  • 2020-11-30 19:48

    I solved this problem: Close Visual Studio, open it again and load the solution, Rebuild your solution. My problem occurred using TFS and VIsual Studio 2010.

    0 讨论(0)
  • 2020-11-30 19:49

    Old post, but this zombie is hitting VS 2017 (I haven't dug into why it's just "some" projects). In this case, it's not user permissions, rather IIS Express process is still using the files.

    You'll see the icon in your task tray

    1. Right Click
    2. Exit
    3. You should be able to rebuild without this annoying "permission denied" message.

    This is also why "restarting Visual Studio" will "fix" the issue. Doing so, stops IIS Express.

    Hth...

    0 讨论(0)
  • 2020-11-30 19:50

    Can any body know why this issue is coming?

    Looking at your response that you resolved your problem by manual copying, I would say that the code you were working on was made by some other user (with administrator privileges too) so it was locked to you. By performing copy --? paste, you made your OWN copy of the source with all access you required. The only thing to notice is that, in this case if this other developer will need to work on your copy, he/she will jump in pretty same problem you got before.

    0 讨论(0)
  • 2020-11-30 19:50

    1) close the visual studio solution

    2) navigate to command prompt --> run as administrator--> iisreset /stop

    3) navigate to c--> Windows --> Microsoft.Net --> Framework64--> v4.030319--> Temporary Asp.NET Files --> Delete all the files and folders in this path.

    4) Navigate back to command prompt --> iisreset /start

    5) Now open the visual studio --> run as administrator --> clean the solution and build it(don't rebuild..just build worked for me)

    0 讨论(0)
  • 2020-11-30 19:51

    Had the same problem, but restarting Visual Studio every time was no option for me, as the issue occurs sometimes very often.

    I handled it by installing Unlocker (tries to install any toolbar at installation, so don't forget to uncheck this), this application gives me fast access to rename/delete a locked ".xml"-File. I know that this only a workaround too, but for me it was the fastest solution to solve this problem.

    0 讨论(0)
  • 2020-11-30 19:51

    I had also the same problem. I fixed it by unchecking the Read-only properties of root folder.

    0 讨论(0)
提交回复
热议问题