Skip to content

Instantly share code, notes, and snippets.

@antonydenyer
Created November 27, 2013 10:14
Show Gist options
  • Save antonydenyer/7673469 to your computer and use it in GitHub Desktop.
Save antonydenyer/7673469 to your computer and use it in GitHub Desktop.
Update all packages in a solution from nuget
Get-ChildItem -path '.' -Recurse -Include 'packages.config' |
Select-Xml -xpath '//package/@id' |
Select-Object -ExpandProperty Node |
Select-Object -ExpandProperty value |
Sort-Object -Unique |
ForEach-Object {
foreach($arg in $MyInvocation.UnboundArguments)
{
if($_ -like $arg)
{
update-package $_
}
}
}
[System.Windows.Forms.SendKeys]::SendWait("{F6}")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment