Creating and Publishing to NuGet

Now that we have a Nuget Server installed and up and running we will want to deploy our packages.

First you’ll need to install the nuget.exe command line bootstrapper

Installing NuGet.exe

  • Download NuGet.exe
  • Place NuGet in a well known location such as c:\utils on your machine
  • Make sure that NuGet.exe is in your path

Then you can take two simple steps to generate your package

nuget pack MyProject.csproj -IncludeReferencedProjects -Prop Configuration=Release

then push your pack to the nuget server, with your APIKey you setup in your web.config of the nuget.server

nuget push {package file} -s http://yourNugetServer/ {apikey}

That is it, you now have your package available in your own private nuget server.

For more details on Creating and Publishing a Package