Borek Bernard
Borek Bernard

Reputation: 53281

How to quickly make a fix in NuGet package hosted on GitHub?

I am using a NuGet package whose source code is on GitHub. I need to make a change in the source code and I know how to do it, however, I'm not sure how to make this change available to my project immediately. I guess the standard process is something like this:

  1. Fork the repo on GitHub
  2. Make the code change
  3. Open a PR
  4. Wait until the project maintainer merges it and publishes a new release on NuGet
  5. Run local NuGet update

The problem is step 4 which can take days or weeks (or forever). I am looking for a workflow in which I can bring the code change to my project immediately, without the wait for the maintainer, but I haven't worked with in the .NET / NuGet ecosystem for a while and have no idea how it should be done.

For example, should I publish a forked NuGet package on nuget.org? Should I create my own private feed? How? Where? Etc.

Upvotes: 20

Views: 2360

Answers (2)

NJS
NJS

Reputation: 506

For a quick and dirty solution to this problem, I copied the DLLs from my fork of the NuGet package, added those DLLs to my project and updated my project references to use those instead. My project still has the reference to the original NuGet package (and all of its 3rd party dependencies), but now it also references DLLs in a local folder.

Upvotes: 0

Aleš Roubíček
Aleš Roubíček

Reputation: 5187

Fork the repo, make the change and then use service like Appveyor or MyGet to host private packages of your fork.

Upvotes: 7

Related Questions