我一直在尝试从Github安装 Rosyln 源代码并按照构建设置说明进行操作。
第一条指令是运行 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 -List
Scope ExecutionPolicy
----- ---------------
MachinePolicy Undefined
UserPolicy Undefined
Process Undefined
CurrentUser Undefined
LocalMachine Undefined
但是,我仍然收到同样的错误。我在 Windows 10 Pro 机器上运行 Visual Studio 2017 Community。
提前致谢
吉姆