Installing nuget package from GitHub

Tony picture Tony · Jan 13, 2016 · Viewed 15.6k times · Source

The command: Install-Package curve25519-uwp installs version 1.0.3 of this package (https://www.nuget.org/packages/curve25519-uwp/)

On GitHub there is a version 1.0.4 that fixes a specific error I am facing.

Can anyone explain how to get that package installed?

I am using visual studio 2015 community edition with git tools installed.

Answer

Philippe picture Philippe · Jan 13, 2016

With NuGet, there is no way to take a pre-version from a Git repository.

You could:

  1. Ask for the release of a new version of the NuGet package, or at least a pre-release.

  2. Clone the repository, build the version, and replace the NuGet package with a local dependency. (Not a good solution!)

  3. Like the above, but put it in your own NuGet server.

  4. Manage the repository as a Git submodule.

  5. Switch from NuGet to Paket which supports references toward a Git repository. (Surely the best solution if your case could appear often.)