AdBlock Detected

We provide high-quality source code for free. Please consider disabling your AdBlocker to support our work.

Buy me a Coffee

Saved Tutorials

No saved posts yet.

Press Enter to see all results

A quick introduction to NuGet | Trickcode

By pushpam abhishek
Listen to this article
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 this post

pushpam abhishek

About pushpam abhishek

Pushpam Abhishek is a Software & web developer and designer who specializes in back-end as well as front-end development. If you'd like to connect with him, follow him on Twitter as @pushpambhshk

Comments