Skip to content

Installing NuGet on VS2010 (first blood)

Updated: at 05:05 PM

So, here are the steps necessary to install NuGet on my windows laptop computer.  I’ve got vs2010 (not sp1) installed, I’ve disabled both Resharper and .net Reflector just to be safe.

First step, is to go to the NuGet.org web site and click on Install.

image

 

Accept the default:

 

image

 

Run Visual Studio 2010 again, then go into Tool/Extension Manager and select “Automatically check for updates to installed extensions” as follows:

 

image

 

Then, go to View / Other Windows / Package Manager and you will get the Nu-Get prompt.

image

 

Now, you' have the NuGet prompt as follows.

 

image

At the PM prompt, to install scaffolding, start typing the following:

Install-Package mvc  {then press tab for auto expansion}

You’ll get a list of all packages that begin with mvc as follows:

image

I choose MvcScaffolding, press enter and.. you’ll get the error that you need to have a project open.  Of course, because it wants to add it to your project.

 

image

 

Now, let me add a real project with a simple class called MyTeam

public class MyTeam
{

[Key]
public int ID { get; set; }

[Required]
public string Name { get; set; }
public string City { get; set; }
public DateTime Founded { get; set; }
}

Now, when I re-run the last command, I get all my Controllers and Views.

image

Hope this helps, I have a lot more to learn now.