Skip to content

Instantly share code, notes, and snippets.

@piers7
Created December 21, 2015 04:47
Show Gist options
  • Save piers7/71ad8e16f69ae942c0f0 to your computer and use it in GitHub Desktop.
Save piers7/71ad8e16f69ae942c0f0 to your computer and use it in GitHub Desktop.
Upgrade nuget packages in one project to match another
# Run this from Package Manager Console
# Make sure 'Default Project' is the one you want to update
# No refunds. YMMV
Select-Xml -Path:.\projectname\packages.config -xpath:'//package' | select-object -ExpandProperty:Node | % { Update-Package $_.Id -Version:$_.Version }
@piers7
Copy link
Author

piers7 commented Dec 21, 2015

I wrote this to sync up a newly-created-from-template MVC app with an existing one in the same solution because Oh My Goodness! what a lot of packages to upgrade otherwise (and didn't want to just update the whole lot to latest)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment