Receiving Error: Unable to copy file "obj\Debug\MyProject.xml" to "bin\Debug\MyProject.xml". Access

C

CGatto

Hi,

We have just started getting the following error during compiles of our
forms-based application. We are developing in VS2008, VB.Net, with Team
Foundation Server-based source control.

Full error message is:
"Unable to copy file "obj\Debug\OurProjectName.xml" to
"bin\Debug\OurProjectName.xml". Access to the path
'obj\Debug\OurProjectName.xml' is denied."

This error has just started happening in our project in the last couple
days. It is intermitant and affecting all developers in our team. The only
way to get around it that we know of is to shut down/restart VS2008. It
will be fine for a few hours and then out of the blue start happening again.

Has anyone out there had a similar experience and found a solution?

Thanks
 
B

Bob Altman

FWIW, I've seen this same problem. I just took a quick look at the Microsoft
Connect website (the official place to provide product feedback -
http://connect.microsoft.com/VisualStudio) and I didn't see this exact problem.
That doesn't mean it hasn't been reported. More than likely my search criteria
didn't pick it up. Can someone else confirm whether or not this bug has been
reported?

Bob
 
C

CGatto

Bob Altman said:
FWIW, I've seen this same problem. I just took a quick look at the
Microsoft Connect website (the official place to provide product
feedback - http://connect.microsoft.com/VisualStudio) and I didn't see
this exact problem. That doesn't mean it hasn't been reported. More than
likely my search criteria didn't pick it up. Can someone else confirm
whether or not this bug has been reported?

Bob

Just as an update: I've downloaded a utility called ProcessExplorer that
allows me to find out which process has the file locked. Once that is
located I am able to delete the handle. Once the handle is deleted I can
recompile the app successfull. This leaves everything working fine until i
have to restart VS2008. Soon after that the error will happen again.
 
C

CGatto

CGatto said:
Hi,

We have just started getting the following error during compiles of our
forms-based application. We are developing in VS2008, VB.Net, with Team
Foundation Server-based source control.

Full error message is:
"Unable to copy file "obj\Debug\OurProjectName.xml" to
"bin\Debug\OurProjectName.xml". Access to the path
'obj\Debug\OurProjectName.xml' is denied."

This error has just started happening in our project in the last couple
days. It is intermitant and affecting all developers in our team. The
only way to get around it that we know of is to shut down/restart VS2008.
It will be fine for a few hours and then out of the blue start happening
again.

Has anyone out there had a similar experience and found a solution?

Thanks

Just an update on the issue for anyone who comes across the same thing. We
seem to have eliminated the problem but in a round-about way that we don't
quite understand. It seems as though our application had several unused
references in place which we removed (via Project Properties > References >
Unused References > Remove). One of those references was to a dll called
OurProjectName.dll located in the bin folder of the project. Why it was
there we do not know and no one can recall adding it in. Since it has been
removed the error has not occured again.
 

DTG

Joined
Jul 22, 2010
Messages
1
Reaction score
0
This last note pointed me in the correct direction. We have a multi-project solution. In order to reference other projects we must, of course, add a reference to the project output. Not sure how it happened but we had a reference to the project that would not compile in the project itself. This circular reference won’t work of course, but your mention of unused references helped me to discover the error.

Thank you
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top