C# - How to add reference to project

2017/10/05 01:31
To add a reference to CSharp project do the following:
  1. Open “Solution Explorer”;
  2. Right click “References”;
  3. Choose “Add Reference”.
Visual Studio Add Reference to project


On the Reference Manager Window go to: “Assemblies” -> “Framework”. In the list find the reference you need, select it and checkup the checkbox in front it. Then select “OK”.

Visual Studio Add Reference to project

Then add the appropriate using directive in your program.

To add a custom Dynamic Link Library (DLL) to you program follow the steps in the beginning of the article (from 1 to 3).
Then on the Reference Manager Window go to: “Browse” on the “Select files to reference…” window navigate to the .dll file. Select it, click “OK”. The added reference must be checked up. If not checkup the check box and select “OK”.

Visual Studio Add Reference to project


Then add the appropriate using directive in your program.