Discussion:
Unable to copy file. ... Access to the path ... is denied.
(too old to reply)
Jerry C
2008-01-08 19:13:03 UTC
Permalink
I am getting the message above when I try to build a Windows Services project
in debug configuration . The path is the debug dir placed in the project by
VS.

The project will build in the release configuration. Is there any
information on this.
I found lots of posts about but none of the "Fixes" worked.



Jerry
Steven Cheng[MSFT]
2008-01-09 04:18:45 UTC
Permalink
Hi Jerry,

From your description, you're encountering "unable to copy file ... .access
denied..." error when try building a windows service project, correct?

Yes, there does existing many such issues on the web. So far I've found a
certain public bug entry related to this issue. Before you take look at
that, I'd like to confirm some further things of your project:

** it the service app used(configured in windows Service manager) when you
developing it or any other application may lock the exe
** is the service project referencing any other reference assemblies(in the
same solution or external ones) which may get locked?

if the problem is the solution/project self specific, you should be able to
get rid of it by close and reopen the solution.

here is the public bug entry which mentioend a issue when the project has
some certain resx file that has referenced an external assembly's
type(which get locked). You may have a look to see whether it helps.

#MSB3021: Unable to copy file" bug still not fixed in final version
http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?Feedbac
kID=114694

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead



==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.



Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.

==================================================


This posting is provided "AS IS" with no warranties, and confers no rights.




--------------------
Thread-Topic: Unable to copy file. ... Access to the path ... is denied.
thread-index: AchSKn3zVVpRPzKtT7yz85Xovga8Cg==
X-WBNR-Posting-Host: 70.147.65.236
Subject: Unable to copy file. ... Access to the path ... is denied.
Date: Tue, 8 Jan 2008 11:13:03 -0800
I am getting the message above when I try to build a Windows Services project
in debug configuration . The path is the debug dir placed in the project by
VS.
The project will build in the release configuration. Is there any
information on this.
I found lots of posts about but none of the "Fixes" worked.
Jerry
Jerry C
2008-01-09 16:38:04 UTC
Permalink
Steven,
Thank you for your reply.

To answer your questions.

The app is a stand aloan application all the dll's are in the bin dir and
not used by any other app.

The error:
Error 1 Unable to copy file "obj\Debug\CDInvoiceDropWatcher.pdb" to
"bin\Debug\CDInvoiceDropWatcher.pdb". Access to the path
'bin\Debug\CDInvoiceDropWatcher.pdb' is denied. CDInvoiceDropWatcher

occurs all the time. Opening and then closing the vs2005 does not work.
The error is only an example of the errors. There are many others that occur
with many of the files in the project. As you see this is a .pdb file in the
debug dir. When I change the project build to Releace the problem is gone.
The Error can be on .exe, .dll and anyother file that is placed in the Debug
Dir.

If there is a resx file that has referenced an external assembly's the
references are put in by VS2005 I do not use the resx files.

Thank you,
--
Jerry
Post by Steven Cheng[MSFT]
Hi Jerry,
From your description, you're encountering "unable to copy file ... .access
denied..." error when try building a windows service project, correct?
Yes, there does existing many such issues on the web. So far I've found a
certain public bug entry related to this issue. Before you take look at
** it the service app used(configured in windows Service manager) when you
developing it or any other application may lock the exe
** is the service project referencing any other reference assemblies(in the
same solution or external ones) which may get locked?
if the problem is the solution/project self specific, you should be able to
get rid of it by close and reopen the solution.
here is the public bug entry which mentioend a issue when the project has
some certain resx file that has referenced an external assembly's
type(which get locked). You may have a look to see whether it helps.
#MSB3021: Unable to copy file" bug still not fixed in final version
http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?Feedbac
kID=114694
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
Thread-Topic: Unable to copy file. ... Access to the path ... is denied.
thread-index: AchSKn3zVVpRPzKtT7yz85Xovga8Cg==
X-WBNR-Posting-Host: 70.147.65.236
Subject: Unable to copy file. ... Access to the path ... is denied.
Date: Tue, 8 Jan 2008 11:13:03 -0800
I am getting the message above when I try to build a Windows Services
project
in debug configuration . The path is the debug dir placed in the project
by
VS.
The project will build in the release configuration. Is there any
information on this.
I found lots of posts about but none of the "Fixes" worked.
Jerry
sathish
2010-11-13 09:11:42 UTC
Permalink
Go through the below link

http://sathishmncl.blogspot.com/2010/11/unable-to-copy-file-access-to-path-is.html
Post by Jerry C
I am getting the message above when I try to build a Windows Services project
in debug configuration . The path is the debug dir placed in the project by
VS.
The project will build in the release configuration. Is there any
information on this.
I found lots of posts about but none of the "Fixes" worked.
Jerry
Post by Steven Cheng[MSFT]
Hi Jerry,
From your description, you're encountering "unable to copy file ... .access
denied..." error when try building a windows service project, correct?
Yes, there does existing many such issues on the web. So far I've found a
certain public bug entry related to this issue. Before you take look at
** it the service app used(configured in windows Service manager) when you
developing it or any other application may lock the exe
** is the service project referencing any other reference assemblies(in the
same solution or external ones) which may get locked?
if the problem is the solution/project self specific, you should be able to
get rid of it by close and reopen the solution.
here is the public bug entry which mentioend a issue when the project has
some certain resx file that has referenced an external assembly's
type(which get locked). You may have a look to see whether it helps.
http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?Feedbac
kID=114694
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
project
by
Post by Jerry C
Steven,
Thank you for your reply.
To answer your questions.
The app is a stand aloan application all the dll's are in the bin dir and
not used by any other app.
Error 1 Unable to copy file "obj\Debug\CDInvoiceDropWatcher.pdb" to
"bin\Debug\CDInvoiceDropWatcher.pdb". Access to the path
'bin\Debug\CDInvoiceDropWatcher.pdb' is denied. CDInvoiceDropWatcher
occurs all the time. Opening and then closing the vs2005 does not work.
The error is only an example of the errors. There are many others that occur
with many of the files in the project. As you see this is a .pdb file in the
debug dir. When I change the project build to Releace the problem is gone.
The Error can be on .exe, .dll and anyother file that is placed in the Debug
Dir.
If there is a resx file that has referenced an external assembly's the
references are put in by VS2005 I do not use the resx files.
Thank you,
--
Jerry
Post by Jerry C
Steven,
I found the problem.
The Debug Directory was included in the project. I don't know how it got
included but it was. I use sourcesafe. I think sourcesafe was checking in the
files as the build put them in the Debug dir. I exculuded the Debug dir and
now I can build.
WARNING: Two or more objects have the same target location
this may have something to do with it. Any ideas on this warning?
Thank you
--
Jerry
Post by Steven Cheng[MSFT]
Thanks for you reply and share the info with us.
For the warning you mentioned, is there any referenced assembly that may
have same name as your output assembly's name? Here is forum thread
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1448882&SiteID=1
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
the
and
access
a
you
the
to
has
http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?Feedbac
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
issues
follow
the
situations
best
contacting
rights.
project
Submitted via EggHeadCafe
Review of Redgate ANTS Performance Profiler 6
http://www.eggheadcafe.com/tutorials/aspnet/945b0f4a-55b9-4799-aaa3-bcbed4131446/review-of-redgate-ants-performance-profiler-6.aspx
Jerry C
2008-01-09 16:49:03 UTC
Permalink
Steven,

I found the problem.

The Debug Directory was included in the project. I don't know how it got
included but it was. I use sourcesafe. I think sourcesafe was checking in the
files as the build put them in the Debug dir. I exculuded the Debug dir and
now I can build.

I get a warning when I build:
WARNING: Two or more objects have the same target location
this may have something to do with it. Any ideas on this warning?


Thank you
--
Jerry
Post by Steven Cheng[MSFT]
Hi Jerry,
From your description, you're encountering "unable to copy file ... .access
denied..." error when try building a windows service project, correct?
Yes, there does existing many such issues on the web. So far I've found a
certain public bug entry related to this issue. Before you take look at
** it the service app used(configured in windows Service manager) when you
developing it or any other application may lock the exe
** is the service project referencing any other reference assemblies(in the
same solution or external ones) which may get locked?
if the problem is the solution/project self specific, you should be able to
get rid of it by close and reopen the solution.
here is the public bug entry which mentioend a issue when the project has
some certain resx file that has referenced an external assembly's
type(which get locked). You may have a look to see whether it helps.
#MSB3021: Unable to copy file" bug still not fixed in final version
http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?Feedbac
kID=114694
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
Thread-Topic: Unable to copy file. ... Access to the path ... is denied.
thread-index: AchSKn3zVVpRPzKtT7yz85Xovga8Cg==
X-WBNR-Posting-Host: 70.147.65.236
Subject: Unable to copy file. ... Access to the path ... is denied.
Date: Tue, 8 Jan 2008 11:13:03 -0800
I am getting the message above when I try to build a Windows Services
project
in debug configuration . The path is the debug dir placed in the project
by
VS.
The project will build in the release configuration. Is there any
information on this.
I found lots of posts about but none of the "Fixes" worked.
Jerry
Steven Cheng[MSFT]
2008-01-10 08:08:25 UTC
Permalink
Thanks for you reply and share the info with us.

For the warning you mentioned, is there any referenced assembly that may
have same name as your output assembly's name? Here is forum thread
mentioned this:

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1448882&SiteID=1

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
Subject: RE: Unable to copy file. ... Access to the path ... is denied.
Date: Wed, 9 Jan 2008 08:49:03 -0800
Steven,
I found the problem.
The Debug Directory was included in the project. I don't know how it got
included but it was. I use sourcesafe. I think sourcesafe was checking in the
files as the build put them in the Debug dir. I exculuded the Debug dir and
now I can build.
WARNING: Two or more objects have the same target location
this may have something to do with it. Any ideas on this warning?
Thank you
--
Jerry
Post by Steven Cheng[MSFT]
Hi Jerry,
From your description, you're encountering "unable to copy file ... .access
denied..." error when try building a windows service project, correct?
Yes, there does existing many such issues on the web. So far I've found a
certain public bug entry related to this issue. Before you take look at
** it the service app used(configured in windows Service manager) when you
developing it or any other application may lock the exe
** is the service project referencing any other reference assemblies(in the
same solution or external ones) which may get locked?
if the problem is the solution/project self specific, you should be able to
get rid of it by close and reopen the solution.
here is the public bug entry which mentioend a issue when the project has
some certain resx file that has referenced an external assembly's
type(which get locked). You may have a look to see whether it helps.
#MSB3021: Unable to copy file" bug still not fixed in final version
http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?Feedbac
Post by Steven Cheng[MSFT]
kID=114694
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
Post by Steven Cheng[MSFT]
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
Thread-Topic: Unable to copy file. ... Access to the path ... is denied.
thread-index: AchSKn3zVVpRPzKtT7yz85Xovga8Cg==
X-WBNR-Posting-Host: 70.147.65.236
Subject: Unable to copy file. ... Access to the path ... is denied.
Date: Tue, 8 Jan 2008 11:13:03 -0800
I am getting the message above when I try to build a Windows Services
project
in debug configuration . The path is the debug dir placed in the project
by
VS.
The project will build in the release configuration. Is there any
information on this.
I found lots of posts about but none of the "Fixes" worked.
Jerry
Loading...