NuGet Improves Mono Support, Adds C++
The NuGet extension for Visual Studio (VS) makes it easier for developers to install and maintain third-party additions. Developers on the .NET platform have benefited from using NuGet since 2010 and with the project's new 2.5 release, C++ developers can now use NuGet to obtain tools and libraries for their projects. (For those looking for version 2.3 or 2.4, you are not missing anything-- the NuGet team says that due to the magnitude of the update, these versions numbers were skipped.)
Looking over the new release, several improvements have been made:
- Ability to confirm file overwrites (including yes to all) during updates / installations rather than defaulting to automatically skipping over them.
- Beyond the previously released PowerShell cmdlet, NuGet now supports updating all installed packages via the GUI with an “Update All” button.
- Fix case insensitivity issues – previously differences in file capitalization could cause problems as NuGet would overlook files. This issue typically occurred on Mono projects running on Linux.
- Adds ability to target MonoAndroid, MonoTouch, and MonoMac frameworks, allowing the creation of NuGet packages will install in a Mono for Android project
- Creation of “Minimum NuGet Version” attribute to packages, indicating what version is required – This allows a NuGet package to specify the minimum version of NuGet that must be used to install it. Note that this change means that pre-2.5 versions of NuGet will not be able to install packages with this attribute set, regardless of its value.
- Package dependencies are now only updated if they need to be-- previously existing packages would be updated to latest regardless of need.
- Usage of \build folder in a package provides for the automatic import of MS Build targets and property files.
NuGet's C++ Support
The other significant addition to the project is NuGet's new support for C++ projects. Jeff Handley of the NuGet blog states that the official description of NuGet has been changed to reflect this addition:
“NuGet is the package manager for the Microsoft development platform including .NET. The NuGet client tools provide the ability to produce and consume packages. The NuGet Gallery (nuget.org) is the central package repository used by all package authors and consumers.”
Using NuGet provides C++ developers with a system that will manage the addition of libraries to projects. NuGet uses MSBuild to generate files with the appropriate properties and targets. An added benefit is that NuGet packages are cached on a per-solution basis, so that the same library can be shared across multiple projects.
NuGet supports VS2010 and VS2012, providing useful support to developers still using the older platform-- an added benefit when taking advantage of the round-tripping feature. Developers at the CoApp project have provided a beta release of a toolset intended to make it easier to create C++ based NuGet packages.
Anatole Tresch Mar 03, 2015