你的位置:首页 > ASP.net教程

[ASP.net教程]On Creating New Project in VS2013: Failed to Initialize the Powershell Host


Today, when I'm creating a new project in VS2013 it gave me the following error message:

Install failed...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.

After I had a try, I found out the solution:

1. Run VS2013 as administrator

2. Open "Tools --> NuGet Package Manager --> Package Management Console"

3. Execute command "get-executionpolicy"

4. Execute command "set-executionpolicy unrestricted", if you're on 64 bit OS, you should also execute "start-job { set-executionpolicy unrestricted } -runas32 | wait-job | receive-job"

Restart VS, done!