c# - 在 Travis CI 上使用 Mono 5.14.0.177、msbuild 15.0、nuget 4.7.1 构建失败,但在 VirtualBox 中无法重现
问题描述
我在 Xenial 和 Trusty Ubuntu 的 Travis CI 上使用 Mono 5.14.0.177、msbuild 15.0、nuget 4.7.1 构建失败,但在 VirtualBox、Ubuntu Xenial 中无法重现。
运行后:
mono tools/nuget/nuget.exe restore pythonnet.sln -o packages
错误信息是:
Currently running NuGet.exe 4.1.0.
Updating NuGet.exe to 4.7.1.
Update successful.
MSBuild auto-detection: using msbuild version '15.0' from '/usr/lib/mono/msbuild/15.0/bin'.
Error parsing solution file at /home/travis/build/pythonnet/pythonnet/pythonnet.sln: Invalid Image
这是在 VirtualBox 中成功构建的:
https://gist.github.com/denfromufa/23557331aba2ad548eba2fbff84f2307
并且在 Travis CI 中构建失败:
https://travis-ci.org/pythonnet/pythonnet/jobs/419381040
GitHub上此问题的更多详细信息:
解决方案
通过降级到 msbuild 14.0,此问题已在 pythonnet Travis CI 中临时修复:
cmd = "{0} update -self".format(nuget)
self.debug_print("Updating NuGet: {0}".format(cmd))
subprocess.check_call(cmd, shell=use_shell)
cmd = "{0} restore pythonnet.sln -MSBuildVersion 14 -o packages".format(nuget)
https://github.com/pythonnet/pythonnet/blob/master/setup.py#L332
推荐阅读
- python - 在Python中合并具有多行标题的excel文件
- java - Liberty JavaEE 8 捕获 ConstraintViolationException
- android - 如何避免 Android 对我的 *Button* 进行拼写检查?
- reactjs - 从复选框中获取名称和当前值:react js
- java - 如何在执行器端点中自动装配 FactoryBeans
- java - 我无法启动从 spring-boot docker maven 插件构建的 docker 映像
- sql - 如何授予执行权限但不插入更新删除
- reactjs - React 中的工具提示在悬停时显示在单个框中
- python - 以 DataFrame 的列作为 x 轴的图形
- cucumber - 增强 cucumber-jvm 日志记录消息