Tag Archives: package management

NuPack brings package management to Microsoft .NET

Microsoft has announced the beta release of NuPack, which is a package manager for .NET projects, mainly focused on open source libraries. NuPack itself is open source.

I downloaded NuPack and took a look. It installs as a Visual Studio extension, and I used it with Visual Studio 2010. Once installed, you get a new Add Package Reference option for any .NET project, which opens this dialog:

image

There seem to be around 40 projects currently available, including some familiar names:

  • Castle Inversion of Control
  • fbConnectAuth Facebook Connect authentication library
  • JQuery – though this already appears by default in many ASP.NET projects
  • log4net logging library
  • Moq mocking library
  • NHibernate object-relational mapper
  • NUnit unit-testing framework

Once you find the package you want to add, click install and it is automatically added to your project, complete with any necessary configuration changes. There is also a PowerShell-based console. In some cases it is better to use the console, as a package can add new commands which you can call from there.

NuPack strikes me as a great idea; one comment to Scott Hanselman’s post on the subject calls it GEM for .NET, GEM being the Ruby package manager. That said my quick go with NuPack has not been entirely smooth, and I got an error on my first attempt at adding NUnit to a project, fixed after restarting Visual Studio.

My main reservation is whether Microsoft will really get behind this and support it, or whether it will end up as another promising initiative that after a while is abandoned.