Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to copy file to server on build. Access to path is denied

I have a solution in Visual Studio that is comprised of 5 projects. The projects build to assemblies (.dll). I have the output path of each project set to \my-web-server\wwwroot\bin, which works fine on one project. In the properties for all of my projects, I have the output path set to the same directory, but when I try building all but one of the projects, I get the error:

Unable to copy file "obj\Release\Index.dll" to "\my-web-server\wwwroot\bin\Index.dll". Access to the path '\my-web-server\wwwroot\bin\Index.dll' is denied.

I assume it could be an issue with permissions, because my organization keeps things locked down, but I have no control over granting permissions. Any help in the right direction is much appreciated.

like image 720
Christopher Garcia Avatar asked Dec 17 '09 18:12

Christopher Garcia


2 Answers

It must've been something silly. I deleted the .dll manually, then rebuilt. Looks like everything's working normally. Thanks.

like image 122
Christopher Garcia Avatar answered Oct 21 '22 05:10

Christopher Garcia


The solution for me was to delete everything in bin and obj folders in every project. Just ran this powershell script as described here.

like image 27
syclee Avatar answered Oct 21 '22 03:10

syclee