Adding a Reference to Your Projects

Installing a tool on your system isn’t enough for you to make use of its features as you write code. You need to make each of your Visual Studio projects aware of where the code libraries you wish to reference are actually located. This step enables the environment to look through a tool’s assembly and determine which classes, methods, properties, and so on are exposed by that particular tool.

Begin by right-clicking on the References folder in the project where you need to use the tool. Select the Add Reference option from the resulting context menu (Figure A-1).

The Add Reference dialog (Figure A-2) will appear. This dialog offers you several options, depending on the type of tool you’re using and how it has installed itself. Each tab lists different types of components you’re able to reference.

You’ll need to decide which tab to use based on the type of component, as reflected in this list:

.NET

Lists all available .NET Framework components. This list is not derived from assemblies installed into the Global Assembly Cache, but rather is path-based and determined by keys added to the registry when the components were installed.

Pulling up the Add Reference context menu

Figure A-1. Pulling up the Add Reference context menu

The Add Reference dialog

Figure A-2. The Add Reference dialog

COM

Lists all available COM components. ...

Get Windows Developer Power Tools now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.