问题与安装的NuGet包
问题描述:
我试图安装的NuGet包,比如统一或的EntityFramework,但下载的NuGet无法安装这些并返回此错误消息后:问题与安装的NuGet包
Your machine group policy or user group policy disables execution of PowerShell script.
Adjust your group policy settings to allow execution of PowerShell scripts
我怎样才能解决这个问题?在此先感谢;)
答
目前老版的NuGet又名不> 1.4不签PowerShell脚本,因此你需要运行从PowerShell命令行:
set-executionpolicy Unrestricted
在1.4,我们要签署的脚本,所以你不应该有这个问题。虽然1.4还没有发货,但很快:)
如果您的管理员已经锁定了PowerShell脚本,那么您可以要求他们为您做这个或等到NuGet 1.4发布。
你使用的是什么版本的NuGet?尝试升级到最新版本。听起来像这个问题:http://nuget.codeplex.com/workitem/834 – PHeiberg 2011-06-15 07:54:20
我的NuGet版本是1.3.20419.9007,我已经将PowerShell ExecutionPolicy更改为Unrestricted。但是我的问题还没有解决! – Sadegh 2011-06-15 14:41:38
注意:我用管理员帐户测试过这个问题,一切都找到了,但我在我自己的帐户(Sadegh)中有这个问题但是这个帐户也在Admonistrators下! – Sadegh 2011-06-15 14:44:00