Scott Hanselman

NuGet Action Plan - Upgrade to 1.1, Setup Automatic Updates, Get NuGet Package Explorer

March 9, '11 Comments [12] Posted in ASP.NET | NuGet
Sponsored By

I've got three small actions for you, Dear Reader. They will make your life better. Perhaps follow along and do them as you read?

First, go get NuGet, the .NET Package Manager. What? You already have it? Do you have NuGet 1.1 already and all setup for automatic upgrades?


Action 1: Automatically Check for Extension Updates

Go into Tools | Options, then Environment | Extension Manager and click "Automatically check for updates to installed extensions."

Visual Studio Options - Automatically check for Package Updates

Turns out that when you have a Visual Studio extension installed, like NuGet, it's not really clear when there are updates available. Many, if not all of your extensions may be out of date. For example, NuGet 1.0 comes with ASP.NET MVC but you probably didn't notice there was an update available. 

Why wouldn't you notice? Because the Updated notification is SO OBVIOUS. </sarcasm>. Can you find it in the screenshot below? Exactly.

Extension Manager with obscure and hard to find Updates button

Things are better with automatic notification turned on. Even more, if you want a cool tray/toast/balloon notification, you can install the Visual Studio Productivity Power Tools.

New extension updates are available

You'll get a nice notification when new stuff is available, like this balloon.


Action 2: Upgrading to NuGet 1.1

If you want to upgrade manually, go to Tools | Extension Manager, click Updates on the left side to see this dialog. Note your current version and the new version and click Update.

NuGet Package Manager in the Extension Manager

And that's it. You are up to date and you'll be notified of updates in the future.

VISUAL STUDIO SP1 GOTCHA: If you're running Visual Studio SP1, you'll need to uninstall NuGet 1.0, then install 1.1 from NuGet.org because SP1 has better support for signed packages and 1.1 is correctly code signed. You'll need to run as Administrator to uninstall NuGet 1.0. Hold down Ctrl-Shift while you click on Visual Studio, or right click and Run As Administrator. You'll know you are (or are not) Administrator for that one instance because [Administrator] will appear in the Title Bar if you are. If you're not, the Uninstall button in Tools | Extension Manager will be grayed out. The whole operation will take <2 minutes.

NuGet with the uninstall button grayed out


Action 3: Get NuGet Package Explorer

Luan, one of the NuGet devs, created this cool NuGet Package Explorer that you can install in seconds via Click Once. It's a little farther down on the releases page at http://nuget.codeplex.com/releases. By the way, there's also a command-line NuGet.exe there to play with.

The NuGet Package Explorer is cool for a number of reasons. Five, in fact.

First, cool high res-icons for *.nupkg files. I respect a fellow who has the attention to detail to register an extension and make super high-res icons. I'm always disappointed when I see the small icons and then make the huge and I'm like "Damn, crappy icon FAIL." Not here. Big thanks to Lenny Bacon for making the icons and giving them to the community!

A lot of NuPkg files with pretty icons

Second, you see all the details, metadata and contents of the file.

NuGet Package Explorer - EFCodeFirst.SqlServerCompact.0.8.8482.1

Third, Packages can be opened directly from the Feed and you can explore their inner workings without missing about with unzipping and what not.

Fourth, you can create new packages and build them within the tool:

image

Fifth, you can publish directly from the NuGet Package Explorer as well.

Publish package

Now you've got the choice to do all your NuSpec package creation totally from the command line or totally graphically. I think it'd be nice if it was installed automatically.


Requirements

Install NuGet here. NuGet requires that PowerShell 2.0 be installed. Powershell 2.0 is already installed if you have one of the following operating systems installed:

  • Windows 7
  • Windows Server 2008 R2

If you have the following operating systems, you will need to manually install Powershell 2.0.

  • Windows XP SP3
  • Windows Server 2003 SP2
  • Windows Vista SP1
  • Windows Server 2008

If you have any problems installing NuGet, please refer to our list of known issues.

Related Links

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by ORCS Web
Wednesday, March 09, 2011 8:01:12 AM UTC
Great.....!

I build the same tool in WPF to create and publish packages about a month ago. But I will use this one as it offers more features which makes it far much better than mine... :)

Prashant
Wednesday, March 09, 2011 10:39:54 AM UTC
Hey Scott,

totally with you on the icon story - thats why I commited them to the community :-)

-Daniel
Wednesday, March 09, 2011 10:42:00 AM UTC
Hey Scott,

The link "NuGet.org" (VISUAL STUDIO SP1 GOTCHA) points to http://wwnuget.o/

-Daniel
Wednesday, March 09, 2011 3:06:54 PM UTC
Hi Scott,

I like the format of this post. I read it before my first cup of coffee this morning (read: before my brain booted up) so I was in a perfect frame of mind to follow simple commands without much resistance. Thankfully these changes were beneficial. I especially like the automatic updates.
Wednesday, March 09, 2011 7:23:16 PM UTC
would love to use NuGet, but it seems like the issue with proxy servers has still not been resolved( http://nuget.codeplex.com/workitem/231 ). There is no support for providing proxy credentials.
NZ
Thursday, March 10, 2011 4:40:31 AM UTC
Would be really nice have an option to specify custom feed in package explorer. I just built couple packages with the tool, but then needed go online to upload to the gallery (dnbegallery.org). Been able create and publish package in one go would be much cleaner experience.
Thursday, March 10, 2011 1:12:06 PM UTC
Scott, what about installing VS 2010 SP1 when Nuget 1.1 is already installed?
Thursday, March 10, 2011 5:35:20 PM UTC
Installing SP1 when NuGet is already installed is no problem.
Monday, March 14, 2011 6:40:00 PM UTC
Good detailed info. I just installed SP1 and will use these directions to get Nuget 1.1. Hoped it'd be in SP1, but guess not ready yet. Really liked POW (package of week) idea. Hope that's ongoing. I think we all need reminders that Nuget is not just for MVC additional stuff.
Wednesday, March 16, 2011 12:12:42 AM UTC
Is there a way to point to local packages in the Enterprise?
Wednesday, March 16, 2011 7:47:09 PM UTC
What about us poor schmucks who can't install nuget because we don't have enough rights on our machines? Why does this require administrator access, anyway?
Wednesday, June 08, 2011 3:38:55 PM UTC
I have VS2010 SP1 and have had no problems upgrading to 1.1.
Comments are closed.

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.