Reputation: 51
I have two projects with two different solution in Visual Studio 2015. How I can add a reference from first project to second project? thanks
Upvotes: 2
Views: 3336
Reputation: 32068
Easy steps. Under your project:
Upvotes: 3
Reputation: 25411
Follow these steps:
bin
directory under the project's root directory) and select your project.dll
using Namespace.Project
) to your source code where you want to use itNote: to find out the full namespace of the project, open the project's properties (right-click on the project in the Solution Explorer, click Properties..., select the Application tab and check the Default namespace.
Upvotes: 1
Reputation: 4113
The way I see it, if you find yourself having to do this you should ask your self if both solutions tackle on a similar problems then you should consider joining then into one single solution. If on the other hand what you need to use between the 2 solutions is some utility library, then perhaps you should consider making it a NuGet
package see documentation or examples.
If you think none of the above is best for you then you should go with:
as in the previous answers.
Upvotes: 1
Reputation: 7790
Under the Project entry in the Solution Explorer, expand it and look for References towards the top of the children. Right click and choose Add Reference
.
In the dialog that opens, on the left side choose Browse and then select the dll from your other project.
Alternatively you can right click the Solution node itself and click Add Existing Project, but that's not quite the same.
Upvotes: 0