More to Package Manger Console than Packages…

The package manger console in visual studio is capable of far more than just adding and removing nuget packages.

It is in fact a full powershell scripting environment with direct access to the Visual Studio IDE Management Api.

This is not just read-only:

$dte.StatusBar.Text = “Hello”

You can find out about the dte’s properties here:

$dte | get-member | out-gridview

The following is a great way of finding what commands are available to visual studio

$dte.Commands | Out-GridView

And this shows the local environment variables:

gci variable:* | out-gridview

I am wondering if this could be used to add command-line refactoring to visual studio.