NuGet Action Plan - Upgrade to 1.1, Setup Automatic Updates, Get NuGet Package Explorer
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."
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.
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.
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.
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.
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!
Second, you see all the details, metadata and contents of the file.
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:
Fifth, you can publish directly from the NuGet Package Explorer as well.
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
- NuGet Package of the Week #1 - ASP.NET Sprite and Image Optimization
- Updating and Publishing a NuGet Package - Plus making NuGet packages smarter and avoiding source edits with WebActivator
- Creating a NuGet Package in 7 easy steps - Plus using NuGet to integrate ASP.NET MVC 3 into existing Web Forms applications
- Take NuGet to the next level with sample packages
- An open source NuGetWizard project at CodePlex for creating NuGet packages from Visual Studio projects, folders, and more.
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.
About Newsletter
totally with you on the icon story - thats why I commited them to the community :-)
-Daniel
The link "NuGet.org" (VISUAL STUDIO SP1 GOTCHA) points to http://wwnuget.o/
-Daniel
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.
Comments are closed.
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... :)