How to create a MonoTouch project using mdtool

I am trying to create a MonoTouch project (Xamarin.iOS 2.0) in a Jenkins build. I have a user that I created for the assembly, and I added all the necessary certificates and keys to my key chain.

When I try to use mdtool (as described here and here ) in the terminal. In particular, the command I'm running is "/Applications/Xamarin Studio.app/Contents/MacOS/mdtool" -v build <path to .sln> . When I do this, I get this conclusion

 MonoDevelop Build tool ERROR [2013-02-28 10:31:36Z]: Android SDK not found, needed by Xamarin.Android add in Loading solution: <path to .sln> Loading solution: <path to .sln> Loading projects .. Building Solution: <Project name> (Ad-Hoc|iPhone) Building: <project name> (Ad-Hoc|iPhone) 

At this point, the assembly stops. If I run the same command under my own user, and not with the Jenkins user, this works as expected. I checked that in fact I have all the certificates and keys for the user jenkins, and that all the Provisioning profiles are accessible through Xcode. I’m kind of in this, and I would really like the help.

To make things more confusing, if I try to build this project using Xamarin Studio under the user jenkins, the process will succeed without problems. But to automate the build process, I have to make a team that can work through the shell.

+3
source share
1 answer

This is because the product license file is installed in your user account (where it works), but cannot be found under your build server account (where it does not work).

You need to copy the license file with:

/Users/***you username**/Library/MonoTouch/License.v2

in

/Users/***your build server account**/Library/MonoTouch/License.v2

Please note that the license of some Xamarin.iOS editions (e.g. Starter and Indie) does not allow you to do this (so this may not work).

+4
source

All Articles