Created
September 16, 2013 06:49
-
-
Save juristr/6577345 to your computer and use it in GitHub Desktop.
Synchronize NuGet with VS project references
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
function Sync-References([string]$PackageId) { | |
get-project -all | %{ | |
$proj = $_ ; | |
Write-Host $proj.name; | |
get-package -project $proj.name | ? { $_.id -match $PackageId } | % { | |
Write-Host $_.id; | |
uninstall-package -projectname $proj.name -id $_.id -version $_.version -RemoveDependencies -force ; | |
install-package -projectname $proj.name -id $_.id -version $_.version | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment