Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/list/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
安装NuGet软件包时出现问题_Nuget_Nuget Package - Fatal编程技术网

安装NuGet软件包时出现问题

安装NuGet软件包时出现问题,nuget,nuget-package,Nuget,Nuget Package,我正在尝试安装Unity或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 我如何解决这个问题?提前感谢;) 当前

我正在尝试安装Unity或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 aka not>1.4不签署powershell脚本,因此您需要从powershell命令行运行以下命令:

set-executionpolicy Unrestricted
在1.4中,我们将对脚本进行签名,这样您就不会有这个问题。虽然1.4尚未发货,但很快:)


如果管理员已锁定powershell脚本,则上述修复可能会失败。在这种情况下,您可以要求他们为您执行此操作,或者等待NuGet 1.4发布

您使用的是什么版本的NuGet?尝试升级到最新版本。听起来像是这个问题:我的NuGet版本是1.3.20419.9007,我已经将PowerShell ExecutionPolicy更改为Unrestricted。但是我的问题还没有解决!注意:我已经用管理员帐户测试了这个问题,所有东西都找到了,但是我在自己的帐户(Sadegh)中有这个问题,但是这个帐户也在administrators下!根据workitem,问题(如果它确实是我链接的问题)在1.4中得到解决。试试1.4,看看是否能解决问题。我是管理员!现在,我如何解锁PowerShell以执行PS脚本?只需打开PowerShell 2命令窗口,该窗口应该是“开始”菜单中的一个链接,然后键入上面的命令(Set Execution blah one)1.4或最新版本,可从源代码中生成:@Matt请阅读我问题的注释2。我以前做过。看来我们应该对集团政策或其他方面做出改变?