[英]Access the powershell console (package manager console) of visual studio programmatically in an extension
[英]Package Manager console command without PowerShell access
您将必须设置执行策略。 默认情况下,限制执行是受限制的。 只需从PowerShell命令提示符运行!
Set-ExecutionPolicy Unrestricted
如果您没有管理员权限,则可以自己设置策略!
Set-ExecutionPolicy Unrestricted -Scope CurrentUser
切记将它们作为命令而不是脚本运行。
请按照以下步骤操作:
输入以下命令:
Set-ExecutionPolicy绕过-强制
按Enter
重新启动程序
如果您无权使用Powershell,请按照以下方式操作:
转到Regedit.exe并遵循以下路径:
HKEY_LOCAL_MACHINE \\ SOFWARE \\ microsoft \\ powershell \\ 1 \\ shelllds \\ microsoft.powershell \\ executionpolicy
并更改此字符串值Bypass
去这个地址:
HKEY_LOCAL_MACHINE \\ SOFWARE \\ microsoft \\ powershell \\ 1 \\ shelllds \\ Scripted.diagnostic \\ executionpolicy
并更改此值以绕过
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.