解决VS2015启动时Package manager console崩溃的问题

安装VS2015,启动以后,Package manager console崩溃,错误信息如下:

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 RemoteSigned. Type "Get-ExecutionPolicy -List" to view your execution policy settings. For more information please see "Get-Help Set-ExecutionPolicy".

Google以后,尝试了不少方式,在PowerShell中 setting execution policy , 修改注册表等,都没有解决。

后来发现这是Nuget的一个bug,并且已经修复了,需要重新安装Nuget, 步骤如下:

  1. 打开Vs2015 Tools -> Extensions and Updates...  卸载 NuGet Package Manager for Visual Studio 2015.

  2. 重启Visual Studio 2015.

  3. 进入 Tools -> Extensions and Updates... 重新安装 NuGet Package Manager for Visual Studio 2015.

  4. 重启Visual Studio 2015.

问题就解决了。 接下来就可以愉快的在Visual Studio 2015中使用 Package manager console 了

原文地址:https://www.cnblogs.com/lcyhjx/p/5237536.html