Visual Studio 2017: Package Manager Console gives error “The type initializer for ‘System.Management.Automation.Runspaces.InitialSessionState’ threw an exception”

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 !!

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.