Export (0) Print
Expand All

How to: Set the Reference Path (C#, J#) 

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#, J#) of the Project Designer.

NoteNote

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.

NoteNote

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 displaying files in the Add Reference Dialog Box.

You can add as many reference paths as you need.

NoteNote

The options available in dialog boxes, and the names and locations of menu commands you see, might differ from what is described in Help depending on your active settings or edition. This Help page was written with the General Development settings in mind. To view or change your settings, choose Import and Export Settings on the Tools menu. For more information, see Visual Studio Settings.

To set a reference path

  1. In Solution Explorer, select the project.

  2. On the Project menu, click <Project Name> Properties.

  3. Click Reference Paths.

  4. In the Folder text box, specify the path to the folder containing assemblies. To browse to the folder, click the ellipsis (…).

  5. Click Add Folder.

To overwrite a reference path

  1. In Solution Explorer, select the project.

  2. On the Project menu, click <Project Name> Properties.

  3. Click Reference Paths.

  4. In the Reference Path box, select the path to overwrite.

  5. In the Folder text box, specify the path to the folder containing assemblies. To browse to the path, click the ellipsis (…).

  6. 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

  1. In Solution Explorer, select the project.

  2. On the Project menu, click <Project Name> Properties.

  3. Click Reference Paths.

  4. In the Reference Path box, select the path to remove.

  5. Click Remove.

See Also

Community Additions

ADD
Show:
© 2014 Microsoft