gpt4 book ai didi

powershell - Roslyn安装-Powershell脚本

转载 作者:行者123 更新时间:2023-12-02 23:55:31 25 4
gpt4 key购买 nike

我一直在尝试从Github安装Rosyln源代码,并遵循build setup instructions

第一条指令是运行Restore.cmd-会产生以下错误消息:

File C:\Code\roslyn-master\build\scripts\build.ps1 cannot be loaded. 
The file C:\Code\roslyn-master\build\scripts\build.ps1 is not digitally signed.
You cannot run this script on the current system. For more information about
running scripts and setting execution policy, see about_Execution_Policies
at
http://go.microsoft.com/fwlink/?LinkID=135170.
+ CategoryInfo : SecurityError: (:) [],
ParentContainsErrorRecordException
+ FullyQualifiedErrorId : UnauthorizedAccess

我已使用Set-ExecutionPolicy禁用检查:

PS C:\ Code \ roslyn-master> Get-ExecutionPolicy-列表
Scope           ExecutionPolicy
----- ---------------
MachinePolicy Undefined
UserPolicy Undefined
Process Undefined
CurrentUser Undefined
LocalMachine Undefined

但是,我仍然收到相同的错误。我正在Windows 10 Pro计算机上运行Visual Studio 2017社区。

提前致谢

吉姆

最佳答案

Restore.Cmd文件包含以下命令:

powershell -noprofile -executionPolicy RemoteSigned-文件“%〜dp0 \ build \ scripts \ build.ps1”-还原%*

我将Powershell策略设置为什么都没有关系-文件将覆盖它。当我删除执行策略子句时,文件运行良好。

关于powershell - Roslyn安装-Powershell脚本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45782490/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com