Permalink
Browse files

Added image to package-console-powershell-cheat-sheet, updated to use…

… figures.
  • Loading branch information...
Silvenga committed Dec 16, 2017
1 parent fa87a88 commit cd31f7252eaf3231d205b1442ed638a20df3d7ef
Binary file not shown.
@@ -3,33 +3,36 @@ Published: 19 Aug 16
Description: A personal cheat sheet on using PowerShell commands via the Package Console.
---
A cheat sheet of all the cool things that knowing PowerShell can help with when dealing with Visual Studio's Package Console.
![Visual Studio plus Powershell](/content/images/2017/vs-plus-ps.png)
> Copy packages from one project to another.
A cheat sheet of all the cool things that knowing PowerShell can help with when dealing with Visual Studio's Package Console.
^^^
```ps1
Get-Package -ProjectName {From Project} | Install-Package -ProjectName {Target Project} -IgnoreDependencies
```
^^^ Copy packages from one project to another.
> Same as above, but if you care about versions
^^^
```ps1
Get-Package -ProjectName {From Project} | % { Install-Package -ProjectName {Target Project} -IgnoreDependencies -Version $_.Version.ToString() $_.Id }
```
^^^ Same as above, but if you care about versions.
> Batch install packages
^^^
```ps1
("xunit","autofixture", "nsubstitute", "fluentassertions") | %{ Install-Package $_ -DependencyVersion Highest }
```
^^^ Batch install packages.
> Install package onto all projects
^^^
```ps1
Get-Project -All | Install-Package Microsoft.Net.Compilers
```
^^^ Install package onto all projects.
> Filter package upgrades
^^^
```ps1
Get-Package -Updates | ?{$_.Id -ne "refit"} | Update-Package
```
^^^ Filter package upgrades.

0 comments on commit cd31f72

Please sign in to comment.