Bug 52313 - Build failed Ubuntu/ Jenkins/ mono-complete
Summary: Build failed Ubuntu/ Jenkins/ mono-complete
Status: RESOLVED NOT_ON_ROADMAP
Alias: None
Product: Tools
Classification: Mono
Component: xbuild ()
Version: unspecified
Hardware: Macintosh Linux
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-02-05 18:11 UTC by Miguel Angel Martin Hernández
Modified: 2018-03-15 10:40 UTC (History)
1 user (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED NOT_ON_ROADMAP

Description Miguel Angel Martin Hernández 2017-02-05 18:11:46 UTC
I have a docker container with Ubuntu/ Jenkins/ mono-complete and I'm trying to build a Xamarin Android project.
In Jenkins I have MSBuild path = /usr/lib/mono/4.5/xbuild.exe

And when I start the build, I have the error
/usr/lib/mono/4.5/xbuild.exe: 1: /usr/lib/mono/4.5/xbuild.exe: MZ����@���: not found
/usr/lib/mono/4.5/xbuild.exe: 2: /usr/lib/mono/4.5/xbuild.exe: Syntax error: word unexpected (expecting ")")

Started by user Miguel Angel Martin Hernandez
Building in workspace /var/jenkins/workspace/Xamarin
 > git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > git config remote.origin.url https://mookiefumi@bitbucket.org/mookiefumi/xamarin.git # timeout=10
Fetching upstream changes from https://mookiefumi@bitbucket.org/mookiefumi/xamarin.git
 > git --version # timeout=10
using GIT_ASKPASS to set credentials 
 > git fetch --tags --progress https://mookiefumi@bitbucket.org/mookiefumi/xamarin.git +refs/heads/*:refs/remotes/origin/*
 > git rev-parse refs/remotes/origin/master^{commit} # timeout=10
 > git rev-parse refs/remotes/origin/origin/master^{commit} # timeout=10
Checking out Revision fee911fdc393e64fdbc04878f32f357a079b8c61 (refs/remotes/origin/master)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f fee911fdc393e64fdbc04878f32f357a079b8c61
 > git rev-list fee911fdc393e64fdbc04878f32f357a079b8c61 # timeout=10
Path To MSBuild.exe: /usr/lib/mono/4.5/xbuild.exe
Executing the command /usr/lib/mono/4.5/xbuild.exe /Xamarin.Droid/Xamarin.Droid.csproj from /var/jenkins/workspace/Xamarin
[Xamarin] $ /usr/lib/mono/4.5/xbuild.exe /Xamarin.Droid/Xamarin.Droid.csproj
/usr/lib/mono/4.5/xbuild.exe: 1: /usr/lib/mono/4.5/xbuild.exe: MZ����@���: not found
/usr/lib/mono/4.5/xbuild.exe: 2: /usr/lib/mono/4.5/xbuild.exe: Syntax error: word unexpected (expecting ")")
Build step 'Build a Visual Studio project or solution using MSBuild' marked build as failure
Finished: FAILURE

Regards.
Thank you so much.
Comment 1 Marek Safar 2018-03-15 10:40:06 UTC
We deprecated xbuild and recommend using msbuild instead. Switching to msbuild will also most likely resolve the issue you reported.