Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding GitHub project as reference in Visual Studio Solution

In a .net solution, I want to add a reference to a project in github.

Is there a way to do this without the extra step of publishing the github project to nuget?

Could it be done by putting a nuget package into the git repo itself?

like image 305
Billy Back Bedroom Avatar asked Feb 18 '17 11:02

Billy Back Bedroom


People also ask

How do I add an existing project to a solution in Visual Studio?

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.


1 Answers

Could it be done by putting a nuget package into the git repo itself?

No, the repo is for source code management, it is not a binary referential like a Nuget repo.

See "Installing nuget package from GitHub"

With Nuget, there is no way to take a pre-version from a git repository.

If you really don't want to publish the binary to a Nuget repo, then you are in source dependency, meaning you can add that GitHub repo as a submodule of your own Git code base, make your .net solution compile that submodule source code, and use the resulting package locally.

like image 172
VonC Avatar answered Oct 20 '22 06:10

VonC