【问题标题】:MSBuild Your project.json doesn't have a runtimes sectionMSBuild 您的 project.json 没有运行时部分
【发布时间】:2017-12-06 15:47:30
【问题描述】:

我有一个 MSBuild 问题,它给出了这个消息:

C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\Microsoft\NuGet\15.0\Microsoft.NuGet.targets(178,5): 错误:您的 project.json 没有运行时部分。您应该将 '"runtimes": { "win10-x86-aot": { } }' 添加到您的 project.json 中,然后重新运行 NuGet restore。

我在 StackOverflow 上发现了几个问题,解决方案似乎是删除 obj 文件夹,但上下文不同。

我只安装了用于 Visual Studio 2017 的 MSBuild(因此,没有 Visual Studio),以便与 Jenkins 一起使用。我的 Jenkins master 安装在 Mac OS 上,MSBuild 安装在仅用于完成这项工作的 Windows 10 PC 上。 如果我使用我的开发机器(装有 Visual Studio 2017 的 Windows 10 笔记本电脑)作为 Jenkins 远程代理并从 Jenkins 门户启动构建,它运行良好,但如果我将另一台 PC 与 MSBuild 一起使用,我就会遇到这个问题。

【问题讨论】:

    标签: jenkins msbuild uwp


    【解决方案1】:

    好的,根据 MSDN 文档 here,我解决了在 CSPROJ 中添加部分的问题

    【讨论】:

    • 更具体地说,这对我有用:<RuntimeIdentifiers>win10-arm;win10-arm-aot;win10-x64;win10-x64-aot;win10-x86;win10-x86-aot</RuntimeIdentifiers>
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2016-04-18
    • 2018-03-20
    • 1970-01-01
    • 2013-03-27
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多