Paket icon indicating copy to clipboard operation
Paket copied to clipboard

Using Git Repository as NuGet Source Still References Package on NuGet.org

Open JarrodJ83 opened this issue 5 years ago • 1 comments

Description

I know this is similar to a couple other open issues but none seemed to point to the specific case of using a git repo as a nuget source.

I've tried to follow the guide here: https://fsprojects.github.io/Paket/git-dependencies.html#Using-Git-repositories-as-NuGet-source but things are still being referenced using the nuget package that is from nuget.org instead of the one locally built by Paket using the build.cmd file from the repo.

Repro steps

Here is the build file within the repo that I want to include as a reference. It builds the nuget packages and puts them into a directory just as the example does: https://github.com/JarrodJ83/pulsar-client-dotnet/blob/develop/build.cmd

My dependencies files looks like:

git https://github.com/JarrodJ83/pulsar-client-dotnet.git develop build: "build.cmd", Packages: /pulsar-client-pkg/
nuget Pulsar.Client

run dotnet paket install

The build files run fine locally and the nuget packages are in the pulsar-client-pkg paket-files directory in the folder I expect.

Expected behavior

Expecting the Pulsar.Client NuGet reference in my lock file to point at the local repo in paket-files

NUGET
    remote: paket-files/github.com/JarrodJ83/pulsar-client-dotnet/pulsar-client-pkg
       Pulsar.Client (1.7.6)
GIT
  remote: https://github.com/JarrodJ83/pulsar-client-dotnet.git
     (db19f1a9840a93b58aecc7e2a6af99051ecd1348)
      build: build.cmd
      path: /pulsar-client-pkg/

Actual behavior

The nuget remote is still pointed to nuget.org instead of the repo.

NUGET
  remote: https://api.nuget.org/v3/index.json
    Pulsar.Client (1.7.4)
GIT
  remote: https://github.com/JarrodJ83/pulsar-client-dotnet.git
     (db19f1a9840a93b58aecc7e2a6af99051ecd1348)
      build: build.cmd
      path: /pulsar-client-pkg/

Known workarounds

No known workarounds.

JarrodJ83 avatar Nov 30 '20 22:11 JarrodJ83

I'm trying with a different github repo but the issue persists. The package gets built successfully but paket.references tries to look for the package on nuget.org.

The local paket-files/* path is not generated in the lock file. This is on paket version 6.0.10.

kaashyapan avatar Sep 09 '21 03:09 kaashyapan