简体   繁体   English

Visual Studio 2015中的Nuget崩溃

[英]Nuget crash in visual studio 2015

Package manager console crash in visual studio 2015 enterprise just after start with error: 出现错误后,Visual Studio 2015 Enterprise中的程序包管理器控制台崩溃:

Windows PowerShell updated your execution policy successfully, but the setting is overridden by a policy defined at a more specific scope. Windows PowerShell成功更新了您的执行策略,但是该设置被在更特定范围内定义的策略覆盖。 Due to the override, your shell will retain its current effective execution policy of RemoteSigned. 由于覆盖,您的外壳程序将保留其当前有效的RemoteSigned执行策略。 Type "Get-ExecutionPolicy -List" to view your execution policy settings. 键入“ Get-ExecutionPolicy -List”以查看您的执行策略设置。 For more information please see "Get-Help Set-ExecutionPolicy". 有关更多信息,请参见“ Get-Help Set-ExecutionPolicy”。

I have tryied a lot of things like like setting execution policy in power shell to remoteSigned but nothing helped, nuget still don't work. 我尝试了很多事情,例如将Power Shell中的执行策略设置为remoteSigned,但无济于事,Nuget仍然无法正常工作。

Any one have the same issue? 有人遇到同样的问题吗? Thanks for any advance. 谢谢你的推进。

Microsoft has published a hotfix for that issue, here is information how to apply it: Microsoft已发布了针对该问题的修补程序,以下是有关如何应用此修补程序的信息:

A hotfix is now available to install. 现在可以安装修补程序。 Please grab the install from one of these locations appropriately: 请从以下位置之一适当地获取安装:

2.8.7 for VS 2013: https://github.com/NuGet/Home/releases/download/2.8.7/NuGet.Tools.vsix VS 2013 2.8.7: https : //github.com/NuGet/Home/releases/download/2.8.7/NuGet.Tools.vsix

3.1.1 for VS 2015: https://github.com/NuGet/Home/releases/download/3.1.1/NuGet.Tools.vsix VS 2015的3.1.1版本: https//github.com/NuGet/Home/releases/download/3.1.1/NuGet.Tools.vsix

NuGet will publish these to the Visual Studio gallery next week. NuGet下周将这些内容发布到Visual Studio画廊。

For more information visit this page: https://connect.microsoft.com/VisualStudio/feedback/details/1572078/nuget-crash-in-visual-studio-2015-enterprise 有关更多信息,请访问以下页面: https : //connect.microsoft.com/VisualStudio/feedback/details/1572078/nuget-crash-in-visual-studio-2015-enterprise

I had the same issue and found solution that worked for me: set execution policy to "Undefined" in all scopes (Remove registry key for Machine and User scopes if they are set by domain policy) and then restart VS and open Package Manager Console. 我遇到了同样的问题,并找到了对我有用的解决方案:在所有范围中将执行策略设置为“未定义”(如果是通过域策略设置,则删除计算机和用户范围的注册表项),然后重新启动VS并打开Package Manager控制台。

Edit: path to key I deleted: 编辑:我删除的键的路径:

HKEY_LOCAL_MACHINE\\SOFTWARE\\Policies\\Microsoft\\Windows\\PowerShell HKEY_LOCAL_MACHINE \\ SOFTWARE \\ Policies \\ Microsoft \\ Windows \\ PowerShell

Key: ExecutionPolicy 关键:执行政策

This command line can be used to automate the process (run as admin), until issue is fixed: 此命令行可用于自动执行该过程(以admin身份运行),直到解决问题为止:

reg delete HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\PowerShell /v ExecutionPolicy /f

After a completely clean install of Visual Studio Professional 2015 from the MSDN Website, I ran VS2015 as Administrator, opened up the Package Manager Console from Tools -> NuGet Package Manager... -> Package Manager Console and I received this error: 从MSDN网站完全干净安装Visual Studio Professional 2015之后,我以管理员身份运行VS2015,从Tools -> NuGet Package Manager... -> Package Manager Console打开了软件包管理Tools -> NuGet Package Manager... -> Package Manager Console ,我收到此错误:

Windows PowerShell updated your execution policy successfully, but the setting is overridden by a policy defined at a more specific scope. Windows PowerShell成功更新了您的执行策略,但是该设置被在更特定范围内定义的策略覆盖。 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. 键入“ Get-ExecutionPolicy -List”以查看您的执行策略设置。 For more information please see "Get-Help Set-ExecutionPolicy 有关更多信息,请参见“ Get-Help Set-ExecutionPolicy

By following the above steps to: 按照上述步骤操作:

  1. Use Tools -> Extensions and Updates... to uninstall NuGet Package Manager for Visual Studio 2015. 使用工具->扩展和更新...来卸载Visual Studio 2015的NuGet软件包管理器。

  2. Restart Visual Studio. 重新启动Visual Studio。

  3. Use Tools -> Extensions and Updates... to re-install NuGet Package Manager for Visual Studio 2015. 使用工具->扩展和更新...重新安装Visual Studio 2015的NuGet程序包管理器。

  4. Restart Visual Studio. 重新启动Visual Studio。

Now when I open up the Package Manager Console, Powershell loads correctly and every thing is good. 现在,当我打开Package Manager控制台时,Powershell可以正确加载并且一切正常。 Hopefully this helps without having to override or set the execution policy. 希望这会有所帮助,而不必覆盖或设置执行策略。

I get the following error in VS 2013 under Tools\\Nuget package Manager\\ Package Manager console.... 我在VS 2013中的Tools \\ Nuget Package Manager \\ Package Manager控制台下收到以下错误....

Issue:Windows PowerShell updated your execution policy successfully, but the setting is overridden by a policy defined at a more specific scope. 问题:Windows PowerShell成功更新了您的执行策略,但是该设置被在更特定范围内定义的策略覆盖。 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. 键入“ Get-ExecutionPolicy -List”以查看您的执行策略设置。 For more information please see "Get-Help Set-ExecutionPolicy 有关更多信息,请参见“ Get-Help Set-ExecutionPolicy

I uninstalled the Nuget Package manager using Tools\\Extension and Updates uninstalled the Nuget Package Manager. 我使用Tools \\ Extension卸载了Nuget软件包管理器,而Updates则卸载了Nuget软件包管理器。

Reinstalled the package manager from below location to solve the issue. 从下面的位置重新安装了程序包管理器以解决此问题。

https://marketplace.visualstudio.com/items?itemName=NuGetTeam.NuGetPackageManagerforVisualStudio2013 https://marketplace.visualstudio.com/items?itemName=NuGetTeam.NuGetPackageManagerforVisualStudio2013

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM