Web Development

Updating and publishing a NuGet package

This is a small reminder about the steps needed to update and publish a NuGet package.

I used this excellent tutorial from Scott Hanselman – but now it’s a little bit outdated.

Note:  you need your NuGet client configured with your API key to get this steps to work

  1. Do your changes to the software
    This is up to you!
  2. Update the version number of your project.
    1. In Visual studio, right click the project in Solution Explorer, choose Properties.
      In the tab Application, click on the button “Assembly info“.
    2. Edit your Assembly and File Version numbers there.
      Note:  maybe you can auto-increment your version number!
  3. Pack!
    1. On the start menu, open the Developer Command Prompt for Visual Studio (2013)
    2. navigate to the directory where your .csproj.nuspec.nupkg files are
    3. just run “nuget pack
      This will create a yourproject.your.project.version.nupkg file.
  4. Publish
    just run “nuget push yourproject.your.project.version.nupkg

That’s it! Let people enjoy your shiny revamped package!