Recently, while working on Visual Studio 2017, when we wanted to launch Package Manager Console from Quick Launch Window, we got the below error message “The type initializer for ‘System.Management.Automation.Runspaces.InitialSessionState’ threw an exception”.


To fix this issue, we installed PowerShell Tools for Visual Studio 2017 from here and restarted Visual Studio. After doing this, we were able to launch the Package Manager Console window.

Hope it helps !!