在使用VS NuGet添加引用时,出现如下信息:

Install failed. Rolling back… Failed to initialize the PowerShell host. If your PowerShell execution policy setting is set to AllSigned, open the Package Manager Console to initialize the host first.

按照http://blog.csdn.net/feng005211/article/details/47293265的指引,找到了适合我的更简单的办法。

进入注册表HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\PowerShell,将ExecutionPolicy的值设为空即可

 

版权声明:本文为hu123rong00原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://www.cnblogs.com/hu123rong00/p/7273627.html