.NET, Silverlight, Visual Studio

NuGet

If you often use open source libraries you probably have a large library with various tools, like I do. NuGet is an extension for visual studio that enables you to install, uninstall and upgrade open source packages into your application very easily. Say for example you want to use MvvmLight or Ninject in your project, with NuGet it’s nothing more that tell it to add the package to your project.

NuGet

NuGet (formerly known as NuPack) is a free, open source developer focused package management system for the .NET platform.

You can download the .vsix extension at http://nuget.codeplex.com.

image

After installing it you can start adding packages to your project in two ways. The first is by right clicking in the Solution Explorer and selecting the Add Library Package Reference… option.

image

This will present you with a dialog where you can find and install a package. To see the package available, select the Online option from the list on the left. You can use the text box on the top right to filter the list to get to the package you want to use. Hit the install button to add the package to your project.

image

To remove a package, go to the same window. The installed packages are shown on the first page. Hit the uninstall button next to the package you would like to remove from your project.

image

Another way of managing packages is thru a powershell like interface, using the keyboard. You can get to the console window by going to the View menu and selecting Other Windows –> Package Manager Console.

image

The following window will show up (the coloration might be different based on your personal color scheme settings in Visual Studio). 

image

You can manage your packages by using a few simple commands.

  •  
    • List-Package
    • Install-Package
    • Update-Package
    • Uninstall-Package

These do exactly what can be expected. The Install, Update and Uninstall need at least the name of the package as parameter. You can type help before each of these commands to get information on the other parameters.

image

One last thing. You can use the Tab key to auto-complete commands and even parameters.

Shout it

3 comments

  1. Pingback: DotNetShoutout

Leave a Reply

Seo wordpress plugin by www.seowizard.org.
%d bloggers like this: