【问题标题】:.NetCore project loading failed in JetBrains Rider on windows.NetCore 项目加载在 Windows 上的 JetBrains Rider 中失败
【发布时间】:2017-03-27 14:05:19
【问题描述】:

我已经安装了最新版本的 JetBrains Rider 1 EAP 并使用 VS2015 创建的 project.json 打开 .NetCore 项目,我已经成功加载,但是当创建新的 .NetCore web 项目或添加新的 .NetCore 类库时使用 .旧项目中的 csproj 与 project.json 库加载失败

Project 'ClassLibrary' load failed: Cannot load the project with the current MSBuild toolset.
Please ensure MSBuild 15.0 is installed.

我还从microsoft 安装了 .NetCore SDK 和运行时

【问题讨论】:

  • 你最好也安装Visual Studio 2017 Community edition,它包含了所有的依赖,即使你不打算使用VS。
  • 是的,Rider 不能使用来自 .net core sdk 的 msbuild... 只能使用 Visual Studio 的那个
  • @DragonFire,你错了,至少对于当前的 EAP 构建,只要你从源代码构建 MSbuild 并拥有最新的 Mono。

标签: c# msbuild asp.net-core .net-core rider


【解决方案1】:

安装最新的 Mono 后,您需要从源代码构建 MSbuild。

https://github.com/Microsoft/msbuild/wiki/Building-Testing-and-Debugging-on-.Net-Core-MSBuild

./cibuild.sh --target CoreCLR

【讨论】:

    【解决方案2】:

    我发现我需要从 VS 2017 安装 build tools

    请注意,在我这样做之后,我收到了另一个错误,详细信息如下:https://youtrack.jetbrains.com/issue/RIDER-6179

    【讨论】:

      【解决方案3】:

      我在 Ubuntu 上遇到了这个问题,试图构建一个 .NET Core 应用程序。

      我找到了这些说明: https://github.com/microsoft/msbuild/blob/master/documentation/wiki/Building-Testing-and-Debugging-on-.Net-Core-MSBuild.md

      这基本上有我:

      • 在本地克隆 msbuild 存储库:

        git clone https://github.com/Microsoft/msbuild

      • 在“bootstrap = true”模式下构建它:

        ./build.sh /p:CreateBootstrap=true

      • 在 Rider 中,将引用的 MsBuild 指向一个“自定义”:

        1. 文件 -> 设置 -> 构建、执行、部署 -> 工具集和构建
        2. 在“使用 MSBuild 版本”下,选择“自定义”
        3. 指向{cloned msbuild}/artifacts/bin/bootstrap/netcoreapp2.1/MSBuild/MSBuild.dll
        4. 保存

      然后骑手更快乐:)

      【讨论】:

        猜你喜欢
        • 2017-06-03
        • 1970-01-01
        • 1970-01-01
        • 2017-10-28
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多