mshwf
mshwf

Reputation: 7449

How to publish nuget package update?

Well, this is my first Nuget package I publish, it's as simple as any first..

I've published it through this command line:

nuget push PKG.1.0.0.0.nupkg 0000000-000-0000-0000-0000000000 -Source https://www.nuget.org/api/v2/package

but I don't know how to update it, you know how difficult it is to google "update nuget package"!

Upvotes: 5

Views: 4850

Answers (3)

Colin Brett Williams
Colin Brett Williams

Reputation: 51

It can be misleading but inside your project file with the XML (either .csproj or .nuspecor the myriad other ways Microsoft decided you could do this shakes fist at sky)...

Make sure that you are not just updating

<FileVersion>1.0.1</FileVersion>

The one that actually is used when you Pack to auto generate a new .nupkg file is THIS:

<Version>1.0.1</Version>

Then either right click your solution inside the solution explorer and click "Pack" or run NuGet pack (probably be in your bin/Release dir where the packed files should be output.

Hope that helps.

Upvotes: 0

Joao Ricardo
Joao Ricardo

Reputation: 421

Another way, if you do not want to use the CLI and push your package, is to go to nuget and in the upload section, upload your package with a higher version number. It will pick up the package ID so you wont be publishing a whole new package. That will update your package on your behalf after nuget validates the uploaded package.

Upvotes: 1

mshwf
mshwf

Reputation: 7449

Changing the version number is all what I needed, but changing the package name will likely publish new package

Upvotes: 4

Related Questions