This blog shows you how to use NuGet with Go to:
- Build and publish NuGet packages to public and internal repositories. You can choose to publish manually or automatically as part of a full-up continuous delivery value stream. Mingle.NET is an example of a NuGet package that is built, tested and published this way.
- Acquire NuGet packages on the fly at build time from public and private repositories. You can choose whether to get the most recent versions of such packages or not.
Publishing Packages
- Put nuget.exe in a folder.
- Check nuget.exe into source control. You probably do this if you have “Allow NuGet to download missing packages during build” enabled.
nuget push MingleNET.1.5.%GO_PIPELINE_COUNTER%.nupkg %NUGETAPIKEY%
%GO_PIPELINE_COUNTER%
is the Go environment variable with a monotonically increasing value each time the pipeline runs. I use this to set a newer version number each time the package is published.%NUGETAPIKEY%
is a secure environment variable defined in the pipeline specification that holds the secret API key.Acquiring Packages
nuget install your-nuget-component -o packages -Source http://YourNuGet/NuGet
If you want to build with the latest version of a NuGet dependency do this:
nuget install your-nuget-component -o packages -Source http://YourNuGet/NuGet -ExcludeVersion
How do you do Continuous Delivery With IIS, NuGet, Chef and TFS?
Continuous Delivery
Go automates and streamlines the build-test-release cycle for worry-free, continuous delivery of your product.