Package Management for .NET developer: NuGet

 

imageThose of you who are reading the blog of Phil Haack have properly heard something about NuGet. “Package Management” sounds a little bit bulky but if you are a developer you should take a look on NuGet – it pays Smiley

 

NuGet?

NuGet is an open source package management system which is developed from microsoftis and non-microsoftis (everything is open source). It should work as a kind of contact point for every kind of open source libraries. It includes a wide filed from Javascript libraries, EMAH handler, NHibernate to Mocking Frameworks. Properly there are a lot more opportunities.

Okay cool … but why?

It seems like this idea is born in the ASP.NET MVC team. In ASP.NET MVC it was the first time, that jQuery was included in the template. Of course this version will be old in a view days or weeks. Result: The developer is forced to collect the files by himself and look up for some updates. It´s the same thing with the server components like NHibernate. In the future NuGet will play an important deployment-role for many frameworks from Microsoft.

To say it short:

In fact NuGet works almost like the Extension Manager of Visual Studio 2010. There are several Microsoft Extensions as well….

If you are from the Ruby on Rails & co. world

Yes… this already exists on several platforms. But anyway it´s nice and fits perfect into the Visual Studio Tool landscape.

Curious?

- Scott Hanselman: NuGet Action Plan – Upgrade to 1.1, Setup Automatic Updates, Get NuGet Package Explorer

How does this look like in exercise?

I´ve changed the jQuery library with the NuGet way on BizzBingo. The advantage is, that I´m now able to check up easily if there is a new version or not Smiley

 

image

image

You are able to download the Visual Studio doc files:

image

The files are loading into the Script directory – but you have to referent them by yourself. In the project a “package.config” file will be created:

imageHere it´s written which package is installed and which version. The packages will be saved nearly the SLN files in an extra directory so you are able to save all the files in the version administration.

If you start your application there is no Voodoo or dark magic happening. NuGet is down loading the files as packages an copy them into the project. Depending on the package there will be some changings of the web.config. But there is nothing bad happening while it runs.

image

Where did I get NuGet? What kinds of Packages are existing?

On the NuGet gallery you can take a look on the actual packages:

image

NuGet is a relatively “young” program – but there is a daily growing community using this service. Of course there are some packages missing but everyone is able to upload new Smiley

For friends of statistics: stats.nuget.org

image

You can take a look on “Getting Started“ on Codeplex. At the front page of nuget.org you will find the link to the installer of Visual Studio.

If you enjoyed this post, please consider leaving a comment or subscribing to the RSS feed to have future articles delivered to your feed reader.

About the author

Written by Code Inside Team

Learn more about our team.

Comment on this post

Recent Posts

  • Automated Security Analyser for ASP.NET websites

    Evil Hackers are lurking everywhere and many Web-applications are delicately and share “too much” with the attacker. A quick (first!) overview offers the Tool “ASafaWeb”. All the website does is making a few requests and writing an Analyses including problem solving’s. There are no permanent disadvantages (bad requests/ DoS attacks and so on). Example: KnowYourStack.com ...

  • image1489-570x194.png
    „Sign in with Twitter“ for your own ASP.NET WebApp

      “Sign in with Twitter” is a popular practice to authenticate the users on your website. One advantage compared to an own registration is the lower inhibition for the user. But on the other hand Twitter doesn’t fess up with all the information’s and you will get into a kind of addiction. At the end ...

  • image1485-570x194_thumb.png
    CodePlex is going to be updated

      CodePlex the Microsoft Open Source Project Hosting Plattform hasn’t changed that much in the last few years and for a few times I thought Microsoft stopped the whole developing process. But now I found out that there is still life in the project. Maybe it is because of the success of GitHub or because ...

  • image1474_thumb.png
    What does Adobe in the flash-free web? Magazine-Style Layouts with CSS Regions!

      Adobe is well known for Photoshop and Flash but of course there is a lot more. According to the “Future Post” from Google Adobe declared one of their big subjects on a Blogpost. I’m talking about the W3C Working Draft to CSS Regions. Adobe cooperates with the WebKit Team and W3C on this. What ...

  • image1471-523x194.png
    HTML 5 Games, Tooling & 3D

      Game Developing is an interesting subject for all kind of software developer. But as a web developer without any Flash-skills there aren’t that much starting points. With HTML5 and the combination between Javascript, CSS3 and fast browsers there are the first “robust” HTML5 games. HTML5 games? Is this real? Neowin created a “Top 10” ...

Support us