Sunday, 10 February 2013

How do you update a NuGet package in Visual Studio 2012?

This another in a brand new series of videos that I am producing for my new YouTube channel HowDoYouDoStuff.

A channel dedicated to short videos on how to do stuff.

In this video, I show you how to update a NuGet package in Visual Studio 2012.


You can read the transcript below.


HTML5 player





 

Transcript


In this video, I am going to show you how simple it is to update a NuGet package in your project in Visual Studio 2012.

Although I am using Visual Studio 2012, the process is almost identical in 2010.

NuGet is a Visual Studio extension that provides a delivery mechanism to add packages stored in the cloud into your projects.

Typically, adding a component to your project would involve downloading an installer, running it then adding a reference to the dll in your project. You might also have to add something to your config file.

Nuget manages this whole process for you.

You launch NuGet either by right-clicking the References node in your project and selecting Manage NuGet Packages or by selecting the same option from the Tools \ Library Package Manager menu.

The NuGet window lists any packages that have already been installed and will let you check online for  additional packages to install.

It is important that you keep your packages up to date. For example, packages are often updated to correct security flaws.

You should therefore periodically check your NuGet packages to see if any updates are available.

Not all packages contain assemblies. For example, the JQuery libraries are delivered as NuGet packages.

As you can see if I expand my scripts folder, the default jquery library in a new ASPNET MVC 3 project is 1.7.1.

However, if I locate the installed JQuery package , I can see that the 1.9.1 library is available.

If I click the Update button, you can see that my jquery script libraries have been updated.
 
There you have it.

In this video, I have shown you how easy it is to update a NuGet package in your Visual Studio 2012 project. There is no reason why you can't easily manage to keep you packages up to date.

Flash player





See you soon

Phil Stirpé
"I don't do average!"


 

1 comment: