2015-06-09 99 views
1

我已经检查了以下错误的解决方案,无济于事。程序包管理器控制台不能正常工作

当在Visual Studio中打开包管理器控制台时,收到一个错误消息,指出“加载格式数据文件时发生错误。路径 - >到文件”无法加载,因为它的执行被软件限制阻止政策。有关更多信息,请联系管理员。

这些都是我所做的纠正但失败的事情。

  1. 运行PowerShell的管理员身份。我设置ExecutionPolicy为RemoteSigned和使用PowerShell(x86)的无限制,PowerShell的ISE(86),也都64位版本..

  2. 运行PowerShell的管理员身份..我设置进程,currentuser和localmachine ExecutionPolicy -scope到RemoteSigned和Unrestricted。

  3. 重新安装Visual Studio。

  4. 将注册表编辑器中的ExecutionPolicy设置为RemoteSigned和Unrestricted。

但我仍然得到错误。可有人请帮助..

感谢

回答

1

让我知道,如果你尝试了以下内容:

PowerShell says "execution of scripts is disabled on this system."

http://sqlish.com/file-ps1-cannot-be-loaded-because-the-execution-of-scripts-is-disabled-on-this-system-please-see-get-help-about_signing-for-more-details/

Powershell profile.ps1 cannot be loaded because its operation is blocked by software restriction policies

如果所有的失败做如下:

这有可能是你改变了政策执行64位 PowerShell和包管理器是否运行32位的(反之亦然)。

我会尝试打开32位控制台(PowerShell的(86)),并设置 执行政策出现,作为错误肯定是指向一个 一种分辨率。

请确保在更改执行策略之后重新启动visual studio,以便更改生效 。还请确保您使用管理员用户名和密码全局更改了执行 策略。

来源:file cannot be loaded because the execution of scripts is disabled on this system