Yesterday, the NuGet package manager for the .NET platform received another update to version 1.6. The following are the innovations in the new version.
Semantic versioning
Added support for the mechanism of semantic versioning (Semantic Versioning (SemVer), which allows you to set the conditions for package dependencies by version in a specific notation. For example:
1.0 = 1.0 ≤ x
')
(, 1.0] = x ≤ 1.0
(, 1.0) = x <1.0
[1.0] = x == 1.0
(1.0,) = 1.0 <x
(1.0,2.0) = 1.0 <x <2.0
[1.0,2.0] = 1.0 ≤ x ≤ 2.0
empty value = latest version.
A description of the notation and versioning documentation in NuGet 1.6 is available at the
following link .
Package restore
NuGet 1.6 introduces a
new mechanism that will simplify the integration of projects with version control systems. Now it is not necessary for the project to store packages in the version control system; instead, packages.config package configuration files will be stored, and NuGet will take over the work of extracting all the necessary packages for building the project.
How it works:
use the new solution menu item to enable the Package restore mechanism
The solution will add a service folder .nuget containing nuget.exe and MSBuid script
NuGet.targets
Now your projects in the solution do not have to contain binary packages or, especially, store them in the version control system, during the compilation all the necessary packages will be automatically downloaded and installed.
NuGet-enabled project templates
NuGet 1.6 supports Visual Studio 2010 project and item templates, which can now include the ability to pre-set NuGet packages necessary for the template to work.
For details on how to create Visual Studio 2010 project templates with NuGet support, see
this guide . A demo project is available for review, which can be
downloaded from here .
Support for shutting down packet sources
When you use multiple sources of packages, in addition to the official package feed from nuget.org (these can be your own feeds, test feeds, company feeds, feeds from Internet services, etc.), sometimes you may need to temporarily exclude some of the package sources. so that NuGet does not try to find packages in them during installation.
In NuGet 1.6, such functionality has been added to the settings of the list of sources for Visual Studio 2010 packages:
Bug fixes
In the new version of NuGet 1.6, 106 bugtracker positions were closed, 95 of which were marked as bugs, and 10 as requests for new features.
Installation
Attention. To upgrade NuGet from a previous version to a new one, you need to install a patch for Visual Studio 2010 that fixes a
bug found in installing signed extensions. Install update
KB2581019 from the Connect website . If you do not want or can not install the update, before upgrading to the new version, remove the previous version of NuGet.