Serenity
Serenity

Reputation: 5098

Need help with build error

Unable to copy file "..\Soln\Project1\Bin\Telerik.Web.UI.dll" to "bin\Debug\Telerik.Web.UI.dll". Access to the path 'bin\Debug\Telerik.Web.UI.dll' is denied. Project2

I got two projects bound to one solution When I build Project2, it gives me the error above. How do I fix this ? I need to add reference of Project2 in Project1. But now that Project2 just won't build. I am unable to do that.

Upvotes: 0

Views: 393

Answers (2)

Hamza Yahia
Hamza Yahia

Reputation: 41

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

but in some cases you should

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

Upvotes: 0

Mehdi LAMRANI
Mehdi LAMRANI

Reputation: 11597

What probably happens is that, while building one project, the builder tries to copy the referenced dll to the debug folder, while it is being locked by the other project (is the second project running ?)

Anyway, try to set the "Copy Local" Attribute to "false" for the Telerik dll you are referencing in both projects

Upvotes: 1

Related Questions