Get-Package -Project parameter

Jan 25, 2011 at 5:11 PM
Would be nice if we could get the installed packages for a given project, just like Install-Package.

Among other things, this would enable a simple scripted way of updating all packages in an entire solution:

foreach ($project in Get-ProjectNames)
{
foreach ($package in (Get-Package -Project $project))
{
Update-Package $package.Id -Project $project
}
}

:)

/kzu

--
Daniel Cazzulino | Developer Lead | MS MVP | Clarius Consulting | +1 425.329.3471
Developer
Jan 25, 2011 at 5:32 PM

FYI Get-ProjectNames is gone in 1.1 so remove them from your scripts when you update. As for Get-Package having a project parameter, it's on the radar but not for 1.1, you can track the bug here:
http://nuget.codeplex.com/workitem/130

Another FYI, updating all packages in a project isn't as simple as you have above (and it's why we haven't implemented it yet).