从 github 克隆源代码后,Roslyn 项目没有加载

Roslyn project's didn't load after cloning the source code from github

我从 github 克隆了 roslyn 的整个源代码。

当我打开一个解决方案时,例如 Roslyn.sln 或 Samples.sln,许多项目无法加载,我在输出 window 中为每个无法加载的项目显示错误'正在加载。

Error: The imported project "BASEPATH.nuget\packages\Microsoft.VSSDK.BuildTools.2.25201\build\Microsoft.VsSDK.BuildTools.props" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk. BASEPATH\Source\Repos\roslyn\build\Targets\Settings.targets

我用的是VS 2015 U2企业版

我希望有人可以帮助解决这个问题。

您必须 运行 根文件夹中的 Restore.cmd 脚本才能在 Visual Studio 中打开。您应该阅读我们的 instructions for building.

只需从您的其他项目中复制一个 roslyn 文件,然后将其粘贴到您的 bin 文件夹中,清理并重建,一切就绪