今天我已经在Win7机器上安装了Visual Studio 2015和.Net 4.6。
启动Visual Studio 2013和2015后,程序包管理器控制台会出现以下错误:
Windows PowerShell updated your execution policy successfully, but the setting is overridden by a policy defined at a more specific scope. Due to the override, your shell will retain its current effective execution policy of "Unrestricted". Type "Get-ExecutionPolicy -List" to view your execution policy settings. For more information, please see "Get-Help Set-ExecutionPolicy."
在控制台中无法输入任何内容。
我试图改变政策,但没有改变。我目前的政策:
对于x86和x64
Scope ExecutionPolicy
----- ---------------
MachinePolicy Unrestricted
UserPolicy Unrestricted
Process Undefined
CurrentUser AllSigned
LocalMachine AllSigned
如何解决此问题,以便我可以使用程序包管理器控制台?
答案 0 :(得分:2)
有可用的修补程序,可用的下载链接。本周他们也可以在Visual Studio gallery
上使用https://github.com/NuGet/Home/issues/974#issuecomment-124774650
答案 1 :(得分:0)
https://blog.nuget.org/20150720/nuget-3.0.0.html的解决方法暂时为我工作:
删除注册表项: HKEY_LOCAL_MACHINE \ SOFTWARE \政策\微软\的Windows \ PowerShell的
效果似乎与Set-ExecutionPolicy Undefined -scope MachinePolicy