How to Add References to Your Visual Studio Project

See Visual Studio: Tips and Tricks for similar articles.

The steps below describe how to add references (.dll's or .exe's) to your Visual Studio project.

Note: This how-to does not cover how to use Service References or Web References.

  1. Within your project in Visual Studio, you must first open the Reference Manage dialog box. This can be accomplished two ways:
    • From the toolbar, select Project - Add ReferenceProject - Add Reference
    • In the Solution Explorer pane, Right click the project then select Add - Reference
    • . Add - Reference
  2. Within the Reference Manager, you select the appropriate category. Categories include:
    • Framework - This includes all .Net libraries installed on the local machine Select the Framework Category
    • Projects - This includes all class library projects in your Visual Studio Solution Select the Projects Category
    • Com - This includes any Com components registered on the local machine. Select the 'Com' Category
    • Browse - this opens a file explorer dialog box and allows you to locate the appropriate dll or exe.
  3. Using the Reference Manager, Choose the category and library within that category. In the example below, I have chosen the System.Web library in the Framework category. Choose the category and library
  4. Once an item is selected, click the OK button and the reference will be added to your project. You can view the references in your project by expanding the references category within your project. View Project References
  5. You can also use the object explorer to browse the classes contained within the referenced library.

Related Articles

  1. How to Add References to Your Visual Studio Project (this article)
  2. How to Use Class Libraries in Visual Studio