[#VS2013] NuGet Error: Failed to initialize the PowerShell host. If your PowerShell execution policy setting is set to AllSigned, open the Package Manager Console to initialize the host first.

Hello!

Today I’ll go with a and easy-to-fix Visual Studio error. I was fixing some old projects and I find that suddenly NuGet decided to stop working.

error01

The error message was pretty clear

‘ EntityFramework 6.1. 1′ already installed.
Adding ‘ EntityFramework 6.1. 1′ to BigAndCoolProject.
Successfully added ‘ EntityFramework 6.1. 1′ to BigAndCoolProject.
Executing script file ‘… \src\packages\EntityFramework.6.1.1\tools\install.ps1′.
Failed to initialize the PowerShell host. If your PowerShell execution policy setting is set to AllSigned, open the Package Manager Console to initialize the host first.

The strange thing is that suddenly the PowerShell execution permissions are “fell” to “Restricted” level. So which well, is time of

-Open a PowerShell console with administrator permissions

-Check the level of permissions with the command ‘Get-ExecutionPolicy’

-Set the level of permissions to “RemoteSigned” with the command “Set-ExecutionPolicy RemoteSigned”

-Ready!

error02

That Yes, the IDE to take changes is necessary to restart Visual Studio.

Greetings @ Home

/El Bruno

Advertisements

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 )

Google+ photo

You are commenting using your Google+ 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 )

w

Connecting to %s