Book Image

NuGet 2 Essentials

By : Damir Arh, Dejan Dakić
Book Image

NuGet 2 Essentials

By: Damir Arh, Dejan Dakić

Overview of this book

<p>NuGet has made the process of finding and referencing libraries from Visual Studio much easier and has strongly contributed to the expansion of an open source ecosystem. In the three years since its release, it has become an essential tool for both consuming and publishing class libraries for the .NET framework.<br /><br />A concise and practical guide to everything that NuGet has to offer to both consumers and publishers. Through many hands on examples, NuGet2 Essentials will demonstrate all of NuGet’s features and teach you how to use them in everyday development in a .NET framework.<br /><br />Starting out by using NuGet for consuming third-party libraries, this concise guide continues with a detailed look at creating your own packages, and ends by teaching you how to set up your own internal server. Through practical examples, you will learn to manage versions of installed libraries on all development and build machines. You will also discover how to create packages for your own libraries so they can be easily consumed, no matter how much configuration they require. By hosting an internal server, you will have full control of packages being used in your development environment.</p> <p><br />By the end of the book, you will know about everything that NuGet has to offer, and how it can make your development process better.</p>
Table of Contents (13 chapters)

Understanding package versioning


Every NuGet package has its version, in this section we will cover how to version our package. As of NuGet 1.6, NuGet supports versioning according to the Semantic Versioning (SemVer) specification.

SemVer

SemVer is a set of rules for versioning your APIs. Every version number has a very specific meaning. Each version number consists of three parts in the dot-separated format, MAJOR.MINOR.PATCH.

Very brief rules for changing a version:

  • A major number should be incremented when incompatible changes are made to the API

  • A minor number should be incremented when you add functionality or features and keep the API as backward compatible

  • A patch number should be incremented when you want to make bug fixes and also keep the API as backward compatible

Note

Semantic Versioning is described in depth at http://semver.org.

The prerelease packages

The default NuGet behavior provides stable packages; but as covered in the Updating referenced third-party libraries section of Chapter...