Unable to copy file. Access to the path is denied

后端 未结 20 3040
[愿得一人]
[愿得一人] 2020-12-05 23:07

I am working on asp.net 3.5 project on remote machine. I am accessing it using remote desktop. When I build the project, I get error:

Error   62  Unable to c         


        
相关标签:
20条回答
  • 2020-12-05 23:18

    Just found this, which worked for me:

    Make sure bin isn't checked in to TFS.

    0 讨论(0)
  • 2020-12-05 23:24

    Removed read only flag on whole solution and it worked. Visual Studio 2012+TFS 2013

    0 讨论(0)
  • 2020-12-05 23:27

    For me, my issue was that my AntiVirus had a handle on the referenced .dll that was used in my solution. Not exactly sure why, plan on researching it later. But killing my AV Service that had the handle, then restarting Visual Studio fixed this issue for me.

    Hope this helps those of you who are maybe having to restart your entire PC when this happens, as before I figured this out, it was the only fix to my solution as well.

    0 讨论(0)
  • 2020-12-05 23:27

    If you only get this for select files:

    1. Go to Published file folder
    2. Select the problem Files
    3. Properties
    4. Uncheck Read-Only

    Apparently this can occur when Source Control non-checked out files are read only, and then someone just copies specific files.

    (I tried other people's suggestions: giving myself write access to wwwroot, running VS as admin, but for me it was the read-only that did the trick. I specify this answer to point out it is the files at the destination you are trying to publish to.)

    0 讨论(0)
  • 2020-12-05 23:28

    I solved this problem by deleting the contentious files from bin folder and rebuilding the project.

    0 讨论(0)
  • 2020-12-05 23:28

    I solved it by excluding my bin folder from my project in VS 2012. Right click on the BIN folder and select "Exclude From Project".

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