Microsoft KB Archive/326997

= PRB: Dependent assembly is locked when building =

PSS ID Number: 326997

Article Last Modified on 6/16/2004

-

The information in this article applies to:


 * Microsoft Visual Studio .NET (2002), Professional Edition
 * Microsoft Visual Studio .NET (2002), Enterprise Architect Edition
 * Microsoft Visual Studio .NET (2002), Enterprise Developer Edition
 * Microsoft Visual Studio .NET (2002), Academic Edition
 * Microsoft Visual Studio .NET (2003), Professional Edition
 * Microsoft Visual Studio .NET (2003), Enterprise Architect Edition
 * Microsoft Visual Studio .NET (2003), Enterprise Developer Edition
 * Microsoft Visual Studio .NET (2003), Academic Edition

-



This article was previously published under Q326997



SYMPTOMS
When you try to build a solution that contains an EXE project, and that also depends on a second Class Library (DLL Assembly) project, you may receive build errors that are similar to the following:

The type or namespace name 'XXXXX' could not be found (are you missing a using directive or an assembly reference?)

Cannot copy assembly 'Tools' to file 'I:\Q326997\samplesViews\Bin\Debug\XXXXX.dll'. The process cannot access the file because it is being used by another process.

The error messages are generated on every other build of the Solution.



CAUSE
The following are two possible causes:
 * The Object Browser window is open during the build. If the Object Browser window is open the object browser may lock Dependent Assembly from building.
 * You build multiple projects to the same directory. This means that the output directories of two or more projects are set to the same directory. If those projects have any kind of references to each other, leave the output directory of each project as its default value.



RESOLUTION
Close the Object Browser window, or set the output directories for your multiple projects to different locations.

Keywords: kbprb KB326997

Technology: kbAudDeveloper kbEIF kbVSNET2002Ac kbVSNET2002EntArch kbVSNET2002EntDev kbVSNET2002Pro kbVSNET2002Search kbVSNET2003Ac kbVSNET2003EntArc kbVSNET2003EntDev kbVSNET2003Pro kbVSNET2003Search kbVSNETSearch kbVSsearch

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© 2004 Microsoft Corporation. All rights reserved.