[ERROR]VS2013建立Web專案時,發生 Could not add all required packages to the project. 的錯誤!

VS2013建立Web專案時,發生 Could not add all required packages to the project. 的錯誤!

今天使用Visual Studio 2013建立Web專案時,發生以下的錯誤,

Package Installation Error
Could not add all required packages to the project. The following packages failed to install from 'C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Stack 5\Packages':
jQuery.1.10.2 : 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.
Modernizr.2.6.2 : 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.
Could not add all required packages to the project. The following packages failed to install from 'C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Stack 5\Packages':
EntityFramework.6.0.0 : 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.

它是請我們將PowerShell execution policy設定成AllSigned,

所以這時請以系統管理者身分開啟PowerShell,然後將PowerShell execution policy設定成AllSigned就可以了,如下,

image

 

參考資料

Using the Set-ExecutionPolicy Cmdlet

Using the Get-ExecutionPolicy Cmdlet

Hi, 

亂馬客Blog已移到了 「亂馬客​ : Re:從零開始的軟體開發生活

請大家繼續支持 ^_^