【发布时间】: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 一起使用,我就会遇到这个问题。
【问题讨论】: