Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 77050

Using Azure DevOps to build the iOS app of a Xamarin.Forms solution

$
0
0

Hi,
I’m trying to build and deploy the iOS app of a Xamarin.Forms demo solution, and I’m having some trouble.

TL;DR;

The simple build pipeline created with the “easy steps” works.
The more general build pipeline created with the “visual designer without YAML” fails (on building the Android project!).

Both of them compile also the Android project (the first one successfully) even if the task is Xamarin. iOS. Is it possible to skip Android compilation?

Long story:

The solution is hosted on GitHub and is opensource ( https://github.com/DomusDotNet/carlocator ).
Using the GitHub Marketplace I’ve installed the Azure Pipeline and set up the first build pipeline, and it works fine:

Too bad actually is not possible to add other tasks (but this is another issue) so I’ve created another build pipeline with the visual designer:

When building, it fails on the “Build Xamarin.iOS solution **/*.sln” task. Digging on the log I’ve found this:

error : Could not find android.jar for API Level . This means the Android SDK platform for API Level is not installed. Either install it in the Android SDK Manager (Tools > Open Android SDK Manager...), or change your Xamarin.Android project to target an API version that is installed. (/Users/vsts/Library/Android/sdk/platforms/android-/android.jar missing.)

So is the Android project build that fails.

My first question is: why the Xamarin.iOS task builds also the Android project?
My second question is: why the first build pipeline (the one created with the “easy steps”) works and the other don’t?

It seems to me that in the second one, no Android SDK is loaded in the agent running host instance, but why can’t we skip the Android build altogether?

I’ve also downloaded the two build logs, removed the timestamps and compared with WinMerge.
I’ve found many differences, but I’d like to highlight two:

Both logs show the same task header:

Task: Xamarin.iOS
Description: Build an iOS app with Xamarin on macOS.
Version: 2.137.1
Author : Microsoft Corporation
Help : More Information (https://go.microsoft.com/fwlink/?LinkID=613729)

But the build engine is different:

Good build >> Microsoft (R) Build Engine version 15.7.224.30163 (xplat-master/d375bb6e Sat Jun 30 05:26:28 EDT 2018) for Mono
Fail build >> Microsoft (R) Build Engine version 15.4.0.0 (master/f296e67b Wed Oct 25 12:26:03 EDT 2017) for Mono

I've attached:

  • The successful build YAML
  • The failed build YAML
  • The successful build log
  • The failed build log

Thanks in advance,
Nicolò Carandini


Viewing all articles
Browse latest Browse all 77050

Trending Articles