Forum Cross Platform with Xamarin

How to build my solution using MSBuild

Hi, I have a xamarin forms solution containing an app for ios, android & windows.
We would like to setup a Jenkins run in order to build and test the apps and, for the moment, we have decided to build the iOS & android apps on a Mac Mini and test them on simulators.
To build the apps, we are using MSBuild as follows:

msbuild "mysolution.sln" /p:Configuration="JenkinsNonUWP" /t:build /p:Platform="iPhoneSimulator"

This produces an app file which differs from the app file produced by Visual Studio.
The msbuild app file (when you view the package contents) contains 2 directories: ".monotouch-32" and ".monotouch-64". Both of these folders contain an ios "exec" file, "xamarin.ios.dll" and "xamarin.ios.dll.mdb"

3 points:

  • If I drag the app to a simulator to install it, I will get an error.

  • On the other hand, these folders do not exist in an app generated by visual studio. And I can drag the app to a simulator to install it ok.

  • If I copy the contents of ".monotouch-64" to the app root directory and delete the folders, I can install the app.

So my question is: how do I prevent these folders from being generated/used in the msbuild app? Do I need to be more specific with my msbuild command?

Thanks,

Sean

Tagged:

Best Answer

  • SeanConlonSeanConlon US ✭✭
    Accepted Answer

    It seems the answer was to adjust the build configuration. We created a "Jenkins" build configuration for the iPhoneSimulator. Within this build configuration, all sub projects/modules were set to jenkins/debug. But in the app properties, the "supported architecture" of the "ios build" was set to "i386 + x86_64".

    By changing this value to "x86_64" only, the problem was solved. The MSBuild call now works and the app can be installed on the simulator.

Answers

  • SeanConlonSeanConlon USMember ✭✭
    Accepted Answer

    It seems the answer was to adjust the build configuration. We created a "Jenkins" build configuration for the iPhoneSimulator. Within this build configuration, all sub projects/modules were set to jenkins/debug. But in the app properties, the "supported architecture" of the "ios build" was set to "i386 + x86_64".

    By changing this value to "x86_64" only, the problem was solved. The MSBuild call now works and the app can be installed on the simulator.

Sign In or Register to comment.