BT
x Your opinion matters! Please fill in the InfoQ Survey about your reading habits!

NuGet 2.0 Brings New Package Conventions, Still no Mono, Python, or C++ Support

by Jonathan Allen on Jul 01, 2012 |

Despite the version tag, NuGet 2.0 is actually a fairly minor release. Aside from improved tab completion in the package manager console, most of the changes revolve around packaging conventions.

In the past, the only folder that supported framework specific folders was “lib”. With this version, “content” and “tools” can likewise be divided. Files in the content folder are copied directly into the project’s root. This is used for license files, images, and anything else needed by the project except for assemblies.

The tools folder is primarily used for the package’s install and uninstall scripts. These scripts are written in PowerShell and executed by the package manager when the package is added to a project. One of the parameters the script receives is $project, which is a reference to Visual Studio’s EnvDTE project object. With it you can do pretty much anything you can with a normal VS plugin or macro.

Another change is the way that package dependencies are registered. In the past package dependencies were all or nothing. Now you can group dependencies by target framework, where in each group is tagged with a specific framework. A default dependency group can also be created, but this is only used if there are no other matches.

NuGet is still a tool explicitly for C#, VB, and F# tool. There is no support for IronPython C++/CLI, or Mono projects. Since you cannot download NuGet packages directly from NuGet.org, developers using these project types need to use the command line tool.

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread
Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Discuss

Educational Content

General Feedback
Bugs
Advertising
Editorial
InfoQ.com and all content copyright © 2006-2014 C4Media Inc. InfoQ.com hosted at Contegix, the best ISP we've ever worked with.
Privacy policy
BT