Solved

MSB3061: Unable to delete file "bin\Debug\<<DLLName>>". Access to the path '<<ReferencePNE>>' is denied

Posted on 2013-11-13
2
2,836 Views
Last Modified: 2013-11-14
Hi,

I'm having problems compiling my project in Visual Studio 2010.
After I compile the first time (after startup), I can't compile a second time because all the DLLs reference appears to be locked. I am not using any source control.
My project is very simple project.

Below is my build output.

 
------ Clean started: Project: WEHinters, Configuration: Release Any CPU ------
c:\WINNT\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(3607,9): warning MSB3061: Unable to delete file "f:\visual studio 2010\Projects\WEHinter\WEHinter\bin\Release\WEHinters.dll". Access to the path 'f:\visual studio 2010\Projects\WEHinter\WEHinter\bin\Release\WEHinters.dll' is denied.
c:\WINNT\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(3607,9): warning MSB3061: Unable to delete file "f:\visual studio 2010\Projects\WEHinter\WEHinter\bin\Release\WEHinters.pdb". Access to the path 'f:\visual studio 2010\Projects\WEHinter\WEHinter\bin\Release\WEHinters.pdb' is denied.
c:\WINNT\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(3607,9): warning MSB3061: Unable to delete file "f:\visual studio 2010\Projects\WEHinter\WEHinter\bin\Release\GSL.Remote.dll". Access to the path 'f:\visual studio 2010\Projects\WEHinter\WEHinter\bin\Release\GSL.Remote.dll' is denied.
c:\WINNT\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(3607,9): warning MSB3061: Unable to delete file "f:\visual studio 2010\Projects\WEHinter\WEHinter\bin\Release\GSL.Remote.Framework.dll". Access to the path 'f:\visual studio 2010\Projects\WEHinter\WEHinter\bin\Release\GSL.Remote.Framework.dll' is denied.
c:\WINNT\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(3607,9): warning MSB3061: Unable to delete file "f:\visual studio 2010\Projects\WEHinter\WEHinter\bin\Release\GSL.Shared.Configuration.dll". Access to the path 'f:\visual studio 2010\Projects\WEHinter\WEHinter\bin\Release\GSL.Shared.Configuration.dll' is denied.
c:\WINNT\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(3607,9): warning MSB3061: Unable to delete file "f:\visual studio 2010\Projects\WEHinter\WEHinter\bin\Release\GSL.Shared.dll". Access to the path 'f:\visual studio 2010\Projects\WEHinter\WEHinter\bin\Release\GSL.Shared.dll' is denied.
c:\WINNT\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(3607,9): warning MSB3061: Unable to delete file "f:\visual studio 2010\Projects\WEHinter\WEHinter\bin\Release\GSL.Shared.Exceptions.dll". Access to the path 'f:\visual studio 2010\Projects\WEHinter\WEHinter\bin\Release\GSL.Shared.Exceptions.dll' is denied.
c:\WINNT\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(3607,9): warning MSB3061: Unable to delete file "f:\visual studio 2010\Projects\WEHinter\WEHinter\bin\Release\GSL.Shared.Framework.dll". Access to the path 'f:\visual studio 2010\Projects\WEHinter\WEHinter\bin\Release\GSL.Shared.Framework.dll' is denied.
c:\WINNT\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(3607,9): warning MSB3061: Unable to delete file "f:\visual studio 2010\Projects\WEHinter\WEHinter\bin\Release\GSL.Shared.Utils.dll". Access to the path 'f:\visual studio 2010\Projects\WEHinter\WEHinter\bin\Release\GSL.Shared.Utils.dll' is denied.
========== Clean: 1 succeeded, 0 failed, 0 skipped ==========
0
Comment
Question by:GouthamAnand
2 Comments
 
LVL 44

Accepted Solution

by:
AndyAinscow earned 500 total points
ID: 39647299
A couple of points that might result in this error.
There are two copies of visual studio running with the same project open in each.
The exe is actually running outside of visual studio when you attempt the second build - so using the dll's which prevents them being deleted.
0
 

Author Closing Comment

by:GouthamAnand
ID: 39648018
Thanks a lot.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Host asp.net pages 5 33
.NET tools for adding thread safety to a web app? 3 31
What namespace do I need to import? 2 25
.NET 2008 VB and C# 6 27
IP addresses can be stored in a database in any of several ways.  These ways may vary based on the volume of the data.  I was dealing with quite a large amount of data for user authentication purpose, and needed a way to minimize the storage.   …
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

815 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now