Export (0) Print
Expand All

Add Reference Dialog Box

The Add Reference dialog box displays tabbed panes that list the various types of components and projects you can browse. To view the Add Reference dialog box, click Add Reference on the Project menu, or right-click the Reference node in Solution Explorer and click Add Reference. In the Add Reference dialog box, select the tab for the type of component you wish to browse.

NoteNote

The number of tabs available at the top of the Add Reference dialog box can vary, depending on the type of project open and the resources it is using.

Changing the Add Reference dialog box edits the project references file for the selected project. A project references file contains information about the run-time requirements of an application or component, such as which files are needed, how they are to be registered, and where on the user's machine they should be installed. The Add Reference dialog box also adds the object hierarchies for the selected projects to the browsing scope in Class View and the Object Browser.

Security noteSecurity Note

When incorporating components that require full-trust permissions to run, be aware that code-access security violations could occur. During development, a project runs at full-trust, but the environment the project is deployed to might be partial-trust. At run time, if the environment is partial-trust, you can get code-access security violations. Thus, it is necessary to test applications in a variety of diverse 'trust' scenarios.

The following tabs and controls are available:

.NET Tab

Lists all .NET Framework components available for referencing.

Component Description

Component Name

Either the full or "friendly" name of the component.

Version

The version number of the component.

Runtime

The version number of the .NET Framework that the component was created with.

Path

The folder path and filename of the component.

COM Tab

Lists all COM components available for referencing.

NoteNote

This tab does not appear during development of Smart Device projects.

Projects Tab

Lists Visual Studio projects in the current solution available for referencing. Select assemblies from this tab to create project-to-project references.

Component Description

Project Name

Displays the names of referenced projects.

Project Directory

Displays the folder path for referenced projects.

Browse Tab

Allows you browse additional files to find a component not listed in the current tab and add it to the list.

Recent Tab

Displays recently added references.

Component Description

Component Name

Either the full or "friendly" name of the component.

Type

The component type listed.

Version

The version number of the component.

Source

The file name of the component and the path to the folder where it is located.

Displaying an Assembly in the Add Reference Dialog Box

The Add Reference dialog box does not automatically display every assembly, even if an assembly has been installed to the Global Assembly Cache (GAC). The Add Reference dialog box is path-based, and there are several methods to display an assembly:

  • Move or copy the assembly to the current project directory (you can find these assemblies using the Browse tab), other project directories within the same solution (you can find these assemblies using the Projects tab), or the Public Assemblies folder at Program Files\Microsoft Visual Studio .NET\Common7\IDE\Public Assemblies; (you can find these assemblies on the .NET tab).

  • Set a reference path to the directory containing the assembly using the Reference Paths Dialog Box (Visual Basic) or the Reference Paths Page, Project Designer (C#, J#).

  • Set a registry key that specifies the location of assemblies to display.

For detailed procedures on how to display an assembly in the Add Reference dialog box, see How to: Add or Remove References in Visual Studio.

See Also

Community Additions

ADD
Show:
© 2014 Microsoft