There are two steps to use GitHub as a NuGet repo and you have done one of them. You need to use Paket nuget
in the paket.dependencies
to actually pull the desired NuGet package from the desired repository/path. The first command which you're issuing is only doing half the work. It is essentially setting your NuGet source. I prefer to use my locally installed git, so instead of Paket's github
, I use git
, but it is essentially the same...
git https://github.com/<User>/<Priv NuGet repo> [branch|label] Packages: <path to .nupkg files>
nuget <NuGet package ID> <semantic version>
So, if my GitHub repo looks like this...
/.
-> A.1.0.0.0.nupkg
-> A.2.0.0.0.nupkg
-> B.1.0.0.0.nupkg
-> C.1.0.0.0.nupkg
And I need A, B, and C, all at v1.0.0.0, I would set up my paket.dependencies
like so...
git https://github.com/EricLease/MyNuGetRepo master Packages: /
nuget A 1.0.0.0
nuget B 1.0.0.0
nuget C 1.0.0.0
NOTE: If your packages are located under some subfolder in the repo, e.g. /nuget/
, then you would change Packages: /
to match (Packages: /nuget/
)
In paket.references
files under I can reference the required package as A
, B
, or C
.
This will result in a paket.lock
file that looks like this...
NUGET
remote: paket-files/github.com/EricLease/MyNuGetRepo
A (1.0.0.0)
B (1.0.0.0)
C (1.0.0.0)
GIT
remote: https://github.com/EricLease/MyNuGetRepo
(xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx)
path: /
Notice that the NUGET remote
for those packages is actually set to your local paket-files
folder, which gets populated by the GIT remote
on packet install
update
.