Khalif Khalif - 1 year ago 191
Ajax Question

Unable to write to output file 'C:\Users\Desktop\Project\Bar\BAR.dll': Access is denied

C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(4181,5): warning MSB3061: Unable to delete file "C:\Users\khalif.haziq\Desktop\Project\Bar\BAR\bin\BAR.dll". Access to the path 'C:\Users\khalif.haziq\Desktop\Project\Bar\BAR\bin\BAR.dll' is denied.
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(4181,5): warning MSB3061: Unable to delete file "C:\Users\khalif.haziq\Desktop\Project\Bar\BAR\bin\AjaxControlToolkit.dll". Access to the path 'C:\Users\khalif.haziq\Desktop\Project\Bar\BAR\bin\AjaxControlToolkit.dll' is denied.
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(4181,5): warning MSB3061: Unable to delete file "C:\Users\khalif.haziq\Desktop\Project\Bar\BAR\bin\Elmah.dll". Access to the path 'C:\Users\khalif.haziq\Desktop\Project\Bar\BAR\bin\Elmah.dll' is denied.
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(4181,5): warning MSB3061: Unable to delete file "C:\Users\khalif.haziq\Desktop\Project\Bar\BAR\bin\Newtonsoft.Json.dll". Access to the path 'C:\Users\khalif.haziq\Desktop\Project\Bar\BAR\bin\Newtonsoft.Json.dll' is denied.
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(4181,5): warning MSB3061: Unable to delete file "C:\Users\khalif.haziq\Desktop\Project\Bar\BAR\bin\YTL.Shared.dll". Access to the path 'C:\Users\khalif.haziq\Desktop\Project\Bar\BAR\bin\YTL.Shared.dll' is denied.
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(4181,5): warning MSB3061: Unable to delete file "C:\Users\khalif.haziq\Desktop\Project\Bar\BAR\obj\Debug\BAR.dll". Access to the path 'C:\Users\khalif.haziq\Desktop\Project\Bar\BAR\obj\Debug\BAR.dll' is denied.


I receive this error when debugging. When i clean the solution then i receive the following error message. Does anyone know the solution?

Answer Source
  1. Please make sure that your folders were not read-only:

    Visual Studio Publish Failed: “Unable to delete file … Access to the path … is denied.”

  2. Run VS as the admin, view the result.

  3. Restart your machine, you could delete the output folder manually after you take a backup for your project, and then re-clean and build the project, view the result.

  4. Update Symantec policy

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download