Check Available .NET Packages without NuPack Installed

October 21, 2010

in NuPack,PowerShell,Xml

Phil Haack posted Hosting Your Own Local and Remote NuPack Feeds. It’s an open source developer focused package manager meant to make it easy to discover and make use of third party dependencies as well as keep them up to date.

Check Available Packages without NuPack Installed

I’ve been poking around in the NuPack source code up on http://nupack.codeplex.com/ but haven’t installed it for Visual Studio yet. I wanted to take a look at what packages they had so here is a script that grabs the feed and shows it with Out-GridView.

The View

image

The PowerShell Code

PowerShell makes easy work of slicing, dicing and transforming XML into different shapes.

Function Get-NuPack {
    $uri = "http://go.microsoft.com/fwlink/?LinkID=199193"
    $wc = New-Object net.webclient
    $xml = [xml] ($wc.downloadstring($uri))            

    $xml.feed.entry | %{
        New-Object PSobject -Property @{
            Author  = $_.author.name
            Name    = $_.PackageId
            Version = $_.Version
        }
    } | Out-GridView
}            

Get-NuPack

{ 2 trackbacks }

Tweets that mention Check Available .NET Packages without NuPack Installed -- Topsy.com
10.21.10 at 9:49 pm
PowerShell Inside of Visual Studio – NuGet (formerly known as NuPack)
10.29.10 at 2:22 pm

{ 0 comments… add one now }

Leave a Comment

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Contrat Creative Commons

© 2007-2012, Doug Finke