Build failures with Mono 5.14.0.177, msbuild 15.0, nuget 4.7.1 on Travis CI, but not reproducible in VirtualBox

半腔热情 提交于 2019-12-23 08:53:58

问题


I'm getting build failures with Mono 5.14.0.177, msbuild 15.0, nuget 4.7.1 on Travis CI for both Xenial and Trusty Ubuntu, but not reproducible in VirtualBox, Ubuntu Xenial.

After running:

mono tools/nuget/nuget.exe restore pythonnet.sln -o packages

the error message is:

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

Here is successful build in VirtualBox:

https://gist.github.com/denfromufa/23557331aba2ad548eba2fbff84f2307

And failing build in Travis CI:

https://travis-ci.org/pythonnet/pythonnet/jobs/419381040

More details in this issue on GitHub:

https://github.com/pythonnet/pythonnet/pull/698


回答1:


This issue has been fixed in pythonnet Travis CI temporarily by downgrading to msbuild 14.0:

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



来源:https://stackoverflow.com/questions/51988395/build-failures-with-mono-5-14-0-177-msbuild-15-0-nuget-4-7-1-on-travis-ci-but

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!