Silvenga

Just another Weblog for the masses.

Package Console Powershell Cheat Sheet

A cheat sheet of all the cool things that knowing PowerShell can help with when dealing with Visual Studio's Package Console.

Copy packages from one project to another.

Get-Package -ProjectName {From Project} | Install-Package -ProjectName {Target Project} -IgnoreDependencies  

Batch install packages

("xunit","autofixture", "nsubstitute", "fluentassertions") | %{ Install-Package $_ -DependencyVersion Highest }

Install package onto all projects

Get-Project -All | Install-Package Microsoft.Net.Compilers  

Filter package upgrades

Get-Package -Updates | ?{$_.Id -ne "refit"} | Update-Package