Roslyn Restore.cmd失败并显示“无法找到路径的一部分”

时间:2018-02-21 08:15:33

标签: install roslyn

在Windows机器上使用Roslyn的说明

https://github.com/dotnet/roslyn/blob/master/docs/contributing/Building,%20Debugging,%20and%20Testing%20on%20Windows.md

它说你应该运行“Restore.cmd”。

当我这样做时,我在PowerShell的输出中遇到了异常:

System.Management.Automation.MethodInvocationException: Exception calling "ExtractToFile" with "3" argument(s): "Could not find a part of the path 'E:\Downloads\Microsoft\RoslynDownloadsFromGitHub\roslyn-master-32414\roslyn-master\Binaries\Tools\dotnet\additionalDeps\Microsoft.AspNetCore.ApplicationInsights.HostingStartup\shared\Microsoft.NETCore.App\2.0.0\Microsoft.AspNetCore.ApplicationInsights.HostingStartup.deps.json'."

1 个答案:

答案 0 :(得分:0)

问题是路径太长了。当我从

更改包含Roslyn下载的目录时
E:\Downloads\Microsoft\RoslynDownloadsFromGitHub\roslyn-master-32414\roslyn-master

E:\Roslyn\32414

然后脚本运行正常。