Created
December 5, 2013 12:59
-
-
Save alimbada/7804762 to your computer and use it in GitHub Desktop.
Commands for downgrading NuGet packages across a solution in Visual Studio using the Package Manager Console
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$projects =Get-Project -All | Select @{ Name=”ProjectName”;Expression={$_.ProjectName}}, @{Name=”Has”;Expression={Get-Package $PackageName -Project $_.Name}} | where { $_.Has -and $_.Has.ToString() -eq '$PackageName $CurrentPackageVersion' } | |
$projects | select { Uninstall-Package $PackageName -ProjectName $_.ProjectName -Force } | |
$projects | select { Install-Package $PackageName -Version $PackageVersionToDowngradeTo -ProjectName $_.ProjectName } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment