Skip to content

Instantly share code, notes, and snippets.

@jrolstad
Created October 22, 2015 14:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jrolstad/611b5a7c2b55a974692c to your computer and use it in GitHub Desktop.
Save jrolstad/611b5a7c2b55a974692c to your computer and use it in GitHub Desktop.
Powershell script that reinstalls Nuget Packages in the Visual Studio Package Manager Console. Useful when a project's framework version is upgraded
$projectName = "<project name>"
Get-Package -projectName $projectName | ForEach-Object {UnInstall-Package -Id $_.Id -projectName $projectName -Force;Install-Package -Id $_.Id -Version $_.Version -IgnoreDependencies -projectName $projectName}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment