all groups > visual studio .net general > january 2006 >
You're in the

visual studio .net general

group:

Cannot Copy Assembly -- Being Used By another process


Cannot Copy Assembly -- Being Used By another process Mark Olbert
1/30/2006 7:49:59 AM
visual studio .net general:
Can anyone explain to me why VS2003 is suddenly (as in, "this didn't used to happen!!!!!!!!!") having a problem copying an assembly
it's building to the runtime directory? Here's the error message:

The file 'OlbertMcHughLLC.DBFramework.MetaData.dll' cannot be copied to the run directory. The process cannot access the file
because it is being used by another process.

Yet, when I shut down VS2003 I can manually delete the file. So obviously the only process using the bloody thing is something
related to the instance of VS2003 which is building it.

RE: Cannot Copy Assembly -- Being Used By another process v-garych NO[at]SPAM online.microsoft.com (
1/31/2006 4:14:36 AM
Hi Mark,

[quoted text, click to view]

If you mean this problem only happens to your
'OlbertMcHughLLC.DBFramework.MetaData.dll' assembly, I think it may be
caused by one of the following conditions:

1. The assemblies that you compile is larger than 64 kilobytes (KB) or
2. The corrsponding solution contains projects that are compiled to the
same output folder or
3. The Copy Local property on one of the referenced assemblies or projects
is set to False.

To work around such problem, you can do any (or all) of the following, as
appropriate for your projects:

1. Compile the outputs for individual projects to different folders. Visual
Studio .NET 2003 do not support a common output folder.
2. Set the Copy Local property for the referenced assembly or project to
True.
3. Verify that you do not have the Object Browser window open.
4. Verify that you do not have the same project (or projects) open in
another instance of Visual Studio .NET.

Please refer to the following KB article for the details:

BUG: "Could not copy temporary files to the output directory" error message
when you build a solution that contains multiple projects
http://support.microsoft.com/default.aspx?scid=kb;en-us;313512


Thanks!

Best regards,

Gary Chang
Microsoft Community Support

======================================================
PLEASE NOTE the newsgroup SECURE CODE and PASSWORD will be updated at 9:00
AM PST, February 14, 2006. Please complete a re-registration process by
entering the secure code mmpng2006 when prompted. Once you have entered the
secure code mmpng2006, you will be able to update your profile and access
the partner newsgroups.
======================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from this issue.
======================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
======================================================
Re: Cannot Copy Assembly -- Being Used By another process Kevin Spencer
1/31/2006 8:10:06 AM
I have had a similar problem when using the XSL debugger to transform XML
code comments to an HTML document.

When using the XSL debugger to do a transform with a large XML file, if the
XSL document contains a reference to an external assembly, the Visual Studio
process does not release the assembly. The size of the XML file I've used to
reproduce this problem is 284 KB. Using Process Explorer, I've seen that it
is the devenv.exe process that holds the handle to the DLL.

This post prompted me to report this as a bug. If you have any insight, I'd
appreciate it.

--

Kevin Spencer
Microsoft MVP
..Net Developer
Who is Mighty Abbott?
A twin turret scalawag.

[quoted text, click to view]

Re: Cannot Copy Assembly -- Being Used By another process v-garych NO[at]SPAM online.microsoft.com (
2/2/2006 3:21:16 AM
Hi Kevin,

Currently I haven't found any known issue similar to this one, I highly
suggest you can submit this issue to our product feedback center, our
development team may communicate with you directly directly on the issue
there:

http://lab.msdn.microsoft.com/productfeedback/default.aspx


Thanks for your understanding!

Best regards,

Gary Chang
Microsoft Community Support
======================================================
PLEASE NOTE the newsgroup SECURE CODE and PASSWORD will be updated at 9:00
AM PST, February 14, 2006. Please complete a re-registration process by
entering the secure code mmpng2006 when prompted. Once you have entered the
secure code mmpng2006, you will be able to update your profile and access
the partner newsgroups.
======================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from this issue.
======================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
======================================================
AddThis Social Bookmark Button