Quantcast
Channel: Scott Hanselman's Blog
Viewing all articles
Browse latest Browse all 1148

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

$
0
0

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



© 2011 Scott Hanselman. All rights reserved.



Viewing all articles
Browse latest Browse all 1148

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>