Search code examples
xamarinraketeamcityxamarin.mac

How to build Xamarin.Mac application from command line or build script


We have a Xamarin.Mac application that is ready to be Continuously Integrated via TeamCity.

We have a build host on Mac machine where Xamarin Studio is installed. The next step is to create a build step in a build configuration.

Unlike VS, Xamarin Studio doesn't seem to have a Xamarin.Studio runner for TeamCity. Thus as articles on Xamarin Wiki recommend, one should use build scripts, like Rake.

I, being a .Net dev, has spent a day learning Rake and I unfortunately don't like it.

Another thing is I don't know which command would build my .sln file given that I reuse some of the Rakefile's I've found online. Please tell me what is the command to build .sln in Xamarin Studio for Mac.

Thank you.


Solution

  • We are using Jenkins with a bash script but the command we call is mdtool like so

    /Applications/Xamarin Studio.app/Contents/MacOS/mdtool build -p:"PROJECT_NAME" -t:Build -c:"RELEASE_TYPE" "SOULTIONFILE.sln"
    

    Just seen this too on the Xamarin forums about Mac build automation