Bug 4124 - mdtool returning exit status code 1 on successful compile with Monotouch project
Summary: mdtool returning exit status code 1 on successful compile with Monotouch project
Status: RESOLVED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: iOS add-in ()
Version: 2.8.6
Hardware: Macintosh Mac OS
: Normal enhancement
Target Milestone: ---
Assignee: Jeffrey Stedfast
URL:
Depends on:
Blocks:
 
Reported: 2012-03-28 11:26 UTC by immodes
Modified: 2015-08-20 13:39 UTC (History)
3 users (show)

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


Attachments
Plain vanilla Monotouch app generated by MonoDevelop - compiling with mdtool returns exit status code 1 (7.88 KB, application/x-rar)
2012-03-28 11:26 UTC, immodes
Details


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 Developer Community or GitHub 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 FIXED

Description immodes 2012-03-28 11:26:42 UTC
Created attachment 1589 [details]
Plain vanilla Monotouch app generated by MonoDevelop - compiling with mdtool returns exit status code 1

Hi There,

While getting Teamcity/Jenkins to compile a MonoTouch project via command line and mdtool, I found that all MonoTouch projects, even when they compiled successfully with no errors (as well as no warnings), mdtool exits with status code 1 (general error).

To be sure that this wasn't an anomoly caused by my projects, I created a plain vanilla single-view monotouch app and compiled it using mdtools and got an exit status code of 1:

nbk:TestExitCode me$ /Applications/SoftwareDevelopment/MonoDevelop.app/Contents/MacOS/mdtool build "-target:Build" "--configuration:Debug|iPhone" TestExitCode.sln 
MonoDevelop Build Tool
Loading solution: /Users/me/Documents/MonoDevelop/TestExitCode/TestExitCode.sln
   Loading solution: /Users/me/Documents/MonoDevelop/TestExitCode/TestExitCode.sln
      Loading projects ..
Building: TestExitCode (Debug|iPhone)
   Building Solution TestExitCode
      Building: TestExitCode (Debug|iPhone)
nbk:TestExitCode me$ echo $?
1

Note that when simply cleaning the project, I got an exit status code of 0 as expected:

nbk:TestExitCode me$ /Applications/SoftwareDevelopment/MonoDevelop.app/Contents/MacOS/mdtool -v build "-target:Clean" "--configuration:Debug|iPhone" TestExitCode.sln 
MonoDevelop Build Tool
Loading solution: /Users/me/Documents/MonoDevelop/TestExitCode/TestExitCode.sln
   Loading solution: /Users/me/Documents/MonoDevelop/TestExitCode/TestExitCode.sln
      Loading projects ..
Cleaning: TestExitCode (Debug|iPhone)
   Cleaning Solution TestExitCode
      Cleaning: TestExitCode (Debug|iPhone)
         Performing clean...
            
            Clean complete
nbk:TestExitCode me$ echo $?
0

I tried this on two MacOSX machines, each with the latest XCode and MonoDevelop tools installed.

Also tried this same test with plain vanilla Mono for Android, and Mono projects and compilation returned exit status code 1 as affected.

Looks like a bug to me. Please confirm.

Thanks in Advance,
Mash
Comment 1 immodes 2012-03-29 13:56:07 UTC
Turned out this was an issue on my end. My dev machine was just not setup properly to compile an iPhone app vs an iPhoneSimulator app (certificates/provisioning profile, etc.). 

Unfortunately it wasn't clear as there wasn't any information given on the command line. May be a good idea to leave this issue open, as a reminder to add a more verbose message on exit status code 1? I leave that to the mono team.

Thanks,
Mash.