A quick introduction to NuGet | Trickcode

NuGet,Microsoft,PM> Install-Package Ninject.MVC3,MVC,jQuery 1.5.1 jQuery.vsdoc 1.5.1 jQuery.Validation 1.8.0 jQuery.UI.Combined 1.8.11 EntityFramework 4.1.10331.0 Modernizr 1.7,MVC Tools Update
Share it:
An Introduction to NuGet

You’ve probably heard of NuGet but might be wondering what it is. NuGet is an open-source package manager created by Microsoft. Package managers make it easier to install/upgrade third party packages and their dependencies. This is possible because each package keeps track of the name and version of other packages that it requires.



For example, to use Ninject.MVC3 you need Ninject which requires WebActivator.

Now you only need to tell NuGet to install Ninject.MVC3 and it will automatically install the correct version of other packages. Similarly, when you tell it to update a package it will update any of the packages that it depends on.

Once you’ve installed NuGet you can install packages using the Install-Package command in the Package Manager Console. For example:

PM> Install-Package Ninject.MVC3

This will install the package in the default project.


NuGet

To install it in a different project you need to either change the default package or use the -P option to specify the package you want to use.

PM> Install-Package Ninject.MVC3 -P MvcApplication.Other

If you’re creating a new MVC3 application using the MVC Tools Update then you’ll be pleased to know that it uses NuGet to install the following packages:

  • jQuery 1.5.1
  • jQuery.vsdoc 1.5.1
  • jQuery.Validation 1.8.0
  • jQuery.UI.Combined 1.8.11
  • EntityFramework 4.1.10331.0
  • Modernizr 1.7
Share it:

NuGet

Post A Comment:

0 comments: