3

I want to ensure that the correct version of mdtool, mono, the sdk and xamarin.android/ios is installed on our CI environment. For that, my idea is to add a version check in the Jenkins/Ant Buildprocess which prevents the build from executing, if the correct version is not installed.

I can receive all the relevant information from xamarin studio, but how do I get the same thing from the command line? Neither xbuild, nor mdtool provide me with a version. If I start a build with mdtool, the most relevant thing that comes up is this here:

build-android:
     [echo] Building for android
     [exec] XBuild Engine Version 3.2.6.0
     [exec] Mono, Version 3.2.6.0
     [exec] Copyright (C) Marek Sieradzki 2005-2008, Novell 2008-2011.

Is there a way to receive the complete version information?

David Müller
  • 5,291
  • 2
  • 29
  • 33

1 Answers1

4

For Xamarin.iOS you can run:

$ /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/bin/mtouch --version

and that will output something like:

mtouch 8.5.0.122 (107d1ad)

which is the version of Xamarin.iOS which shipped the mtouch command.

You can get something similar for Xamarin.Android using:

$ /Library/Frameworks/Xamarin.Android.framework/Versions/Current/bin/mandroid --version mandroid 4.16.0.44545666 Business

poupou
  • 43,413
  • 6
  • 77
  • 174
  • Thank you so much, works awesome! The only thing is that for me, `mtouch` is located here: `/Developer/MonoTouch/usr/bin/mtouch --version` – David Müller Nov 18 '14 at 09:41
  • You might be using an older version of XI. The location was changed a few releases back (7.4). http://developer.xamarin.com/releases/ios/xamarin.ios_7/xamarin.ios_7.4/ – poupou Nov 18 '14 at 13:55