BT

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

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

Bookmarks

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.

Rate this Article

Adoption
Style

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.

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

Community comments

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

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

BT

Is your profile up-to-date? Please take a moment to review and update.

Note: If updating/changing your email, a validation request will be sent

Company name:
Company role:
Company size:
Country/Zone:
State/Province/Region:
You will be sent an email to validate the new email address. This pop-up will close itself in a few moments.