Tuesday, 12 October 2010

Package management in .NET

Looks like Microsoft are solving the horrendous situation around package management in the .NET world. The solution is called NuPack.

NuPack solves the annoying situation that when working with open source libraries you have to hunt around for the various versions, find which ones are compatible and manually add then to your solution. Manually adding open source frameworks to your solution can involve all sorts of things such as putting binaries in a “library” folder, modifying configuration files and jumping through various other hoops. Mileage varies according to framework.

NuPack address most, if not all of these problems. Taking inspiration from Ruby Gems, it manifests itself through a Visual Studio Add-In. It automates the entire process of adding an open source framework to your solution. Binaries will be downloaded from a centralised feed, your configuration files will be updated and what ever else needs to be done will be done. There’s also the neat trick that should you wish to use FrameworkX and it depends on FrameworkY, then NuPack will automatically retrieve (and configure) FrameworkY when you request FrameworkX (it will resolve a whole dependency tree for you).

It has the added benefit that it does not install anything or put items in the GAC. You can add a dependency to your solution with NuPack and commit your solution to source control as normal. Should another developer then get the solution from source control everything will be there that they need, they don’t need to run NuPack themselves or even have NuPack installed. NuPack also has a PowerShell interface.

It can be found on CodePlex and the usual suspects have introductory posts here (ScottGu), here (Hanselman) and here (Haack).

NuPack is not the only candidate solution to this problem though, OpenWrap is an alternative.


1 comments:

Chris Seed said...

Interestingly there is already a Ruby gem that does exactly this - and it's called "nu" http://nu.wikispot.org/ - coincidence?

About Me