Installing NuGet on VS2010 (first blood)

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.

About Peter Kellner

Peter is a software professional specializing in mobile and web technologies. He has also been a Microsoft MVP for the past 7 years. To read more about Peter Kellner and his experience click here. For information about how Peter Kellner might be able to help you with your project click here.

Follow me:


Comments

  1. Coupon Roxanne says:

    Thanks for the details on installation, helped me save time so I could shop online with my Sears Coupons

  2. Great post keep it up

  3. robinson80 says:

    Now, when I re-run the last command, I get all my Controllers and Views.Hope this helps, I have a lot more to learn now.Installing NuGet on VS2010 (first blood)

Trackbacks

  1. Installing NuGet on VS2010 (first blood) – Peter Kellner…

    Thank you for submitting this cool story – Trackback from DotNetShoutout…

Follow

Get every new post delivered to your Inbox

Join other followers: