How to: Set the Reference Path (C#)
When you reference an assembly in your project, Visual Studio first searches for the assembly in the project directory. If you use an assembly not located in the project directory, you can specify its location in the Reference Paths Page, Project Designer (C#) of the Project Designer.
Note
The procedure for setting the reference path for Visual Basic projects is slightly different. For more information, see How to: Add or Remove References in Visual Studio (Visual Basic).
Note
If the reference to the assembly is not in the project or listed in the Reference Paths pane of the Project Designer, Visual Studio checks the directories that display files in the Add Reference Dialog Box.
You can add as many reference paths as you need.
Note
Your computer might show different names or locations for some of the Visual Studio user interface elements in the following instructions. The Visual Studio edition that you have and the settings that you use determine these elements. For more information, see Visual Studio Settings.
To set a reference path
In Solution Explorer, select the project.
On the Project menu, click <Project Name> Properties.
Click Reference Paths.
In the Folder text box, specify the path of the folder that contains assemblies. To browse to the folder, click the ellipsis (…).
Click Add Folder.
To overwrite a reference path
In Solution Explorer, select the project.
On the Project menu, click <Project Name> Properties.
Click Reference Paths.
In the Reference Path box, select the path to overwrite.
In the Folder text box, specify the path of the folder that contains assemblies. To browse to the path, click the ellipsis (…).
Click Update. The path selected in the Reference Path box is overwritten with the path specified in the Folder text box.
To remove a reference path
In Solution Explorer, select the project.
On the Project menu, click <Project Name> Properties.
Click Reference Paths.
In the Reference Path box, select the path to remove.
Click Remove.
See Also
Concepts
Introduction to the Project Designer