Add Reference Dialog Box
Updated: July 2009
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, when a project is selected, 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.
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. Also some components in the list may be disabled and display in grey depending on the .NET Framework version of your project. This is because some components from a more recent .NET Framework version are not compatible with projects based on an earlier .NET Framework version.
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.
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:
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 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 (Visual Basic).