首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Visual Studio 2013/2015包管理器控制台未初始化

Visual Studio 2013/2015包管理器控制台未初始化
EN

Stack Overflow用户
提问于 2015-07-22 17:28:39
回答 2查看 5.7K关注 0票数 3

今天,我已经在我的Win7机器上安装了Visual Studio2015和.Net 4.6。

启动Visual Studio 2013和2015后,包管理器控制台显示以下错误:

代码语言:javascript
复制
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

代码语言:javascript
复制
                         Scope                                             ExecutionPolicy
                         -----                                             ---------------
                 MachinePolicy                                                Unrestricted
                    UserPolicy                                                Unrestricted
                       Process                                                   Undefined
                   CurrentUser                                                   AllSigned
                  LocalMachine                                                   AllSigned

我如何解决这个问题,这样我才能使用Package Manager控制台?

EN

回答 2

Stack Overflow用户

发布于 2015-07-27 14:39:06

有一个热修复程序,下载链接可用。本周,它们也可以在Visual Studio图库中使用

https://github.com/NuGet/Home/issues/974#issuecomment-124774650

票数 2
EN

Stack Overflow用户

发布于 2017-10-09 21:42:42

https://blog.nuget.org/20150720/nuget-3.0.0.html的变通方法对我来说是暂时有效的:

在以下位置删除注册表项: HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\PowerShell

效果看起来和Set-ExecutionPolicy Undefined -scope MachinePolicy一样

所以这有点侵入性。另外,我认为它在我下次打开PowerShell控制台时被恢复了。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/31559163

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档