Search code examples
jenkinsxamarin.androidxamarinxbuild

Using Xbuild with Xamarin.Android (formerly Mono for Android)


We have a Xamarin.Android project that we are trying to build using Jenkins on a Mac. The Solution file contains several different projects, one of which is the MonoDroid project. The MonoDroid Project is dependent upon the other projects in the solution.

The problem that I have is that when I use xbuild to build the solution file, I have no way to use the /t:PackageForAndroid target, since it only is valid for the MD Project File.

Currently in Jenkins, I'm doing it like this:

xbuild MyCoolDroidAp/MyCoolDroidApp.sln /p:Configuration=Release /t:Clean
xbuild MyCoolDroidApp/MyCoolDroidApp.sln /p:Configuration=Release /t:Build
xbuild MyCoolDroidApp/MyCoolDroidProject.csproj /p:Configuration=Release /t:PackageForAndroid

This is working, but it seems to me that there should be a way to eliminate the 3rd step. Does anyone have any insight?


Solution

  • The consensus around the interwebs seems to be that I am doing this the right way.