Microsoft KB Archive/309815

= PRB: Paths Are Hard Coded in the Project References =

Article ID: 309815

Article Last Modified on 8/7/2003

-

APPLIES TO


 * Microsoft Visual C# .NET 2002 Standard Edition
 * Microsoft Visual Basic .NET 2002 Standard Edition

-



This article was previously published under Q309815



SYMPTOMS
In a Visual Basic .NET or Visual C# .NET project, if you use the Add Reference dialog box to add a reference to a managed dynamic link library (DLL), the path to the DLL is hard coded in References Path of the project properties. References Path is stored in the user specific .csproj.user file.

If the path to the DLL is hard coded, problems may occur in some cases. For example, if the project is shared among developers who have different directory structures, the reference path may not be valid and the developers must each modify the path to build the project on their own computers.



RESOLUTION
To avoid this problem, add to your solution the library project that you want to reference, and then use the Projects tab in the Add Reference dialog box to add the reference to the library project.

If you cannot make the library project part of your solution, you may try the following two suggestions:  Place the DLL that you want to reference in the Obj folder of your project, and then use the Add Reference dialog box to add the reference to the DLL from that location.

-or- In your Visual Basic .NET or Visual C# .NET project:  On the Project menu, click Add Existing Item. Click to select the DLL that you want to reference. On the Open button, click the down arrow, and then click Link File. Use the Add Reference dialog box to add the reference to the DLL.</ol> </li></ul>

<div class="status_section">

STATUS
This behavior is by design.

Keywords: kbprb kbbuilder KB309815

-

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

© Microsoft Corporation. All rights reserved.