Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add a project as a reference of another project

Tags:

I'm trying to add a project that contains some classes as a reference to another project, but I have not got, all your suggestions will be great

Thank you

enter image description here

like image 882
José Gabriel Almendares Avatar asked May 23 '16 18:05

José Gabriel Almendares


People also ask

How do you add a project reference from another solution?

Add a reference In Solution Explorer, right-click on the References or Dependencies node and choose either Add Project Reference, Add Shared Project Reference, or Add COM Reference. (You can right-click the project node and select Add from the fly-out menu to choose from these options, too.)

How do I add a project to an existing project?

In Solution Explorer, select the solution. On the File menu, point to Add, and click Existing Project. In the Add Existing Project dialog box, locate the project you want to add, select the project file, and then click Open. The project is added to the selected solution.

How do you reference a class from another project?

You will need to right click your project and select add -> Reference... -> Projects and tick the project you would like to reference. The result of this should show the referenced project under the references section of your project tree.


1 Answers

Do the following:

  1. Open the File menu.
  2. Choose Add, then Existing project
  3. Add the project you want into your solution

senter image description here

  1. From the solution explorer, select the References item of the project you want to need to reference the "other project" into.

  2. Click on Add reference

  3. Choose the project item

  4. Add your other project as reference to the main project.

enter image description here

Alternatively, you can compile the other project as DLL and add it (as dll) to your main project.

like image 150
Sage Pourpre Avatar answered Dec 27 '22 06:12

Sage Pourpre