2
votes

When I tried to build Xamarin Forms iOS app in the App Center, it is checking the reference of Android and throwing exceptions/issues.

Can anyone know why is this happening ?

PS: Both Android and iOS builds are working fine in local.

Error Image: enter image description here

Thanks in advance.

2
Please do not post errors as images. And can you post more error detail? What it the exceptions?Jack Hua
Hi Jack, I am not able to attach error log file, Moreover I got the solution.. Thanks :-)Anbu Mani
OK, you can write an answer and share your solution there which will help more people with same problem:).Jack Hua

2 Answers

2
votes

Looks like your iOS pipeline is trying to use *.sln file of the whole solution. I guess you should try to build only *.iOS.csproj directly. Below an example of the build iOS project task from *.yml:

 - task: XamariniOS@1
        displayName: Build App.iOS
        inputs:
          solutionFile: 'App.iOS/App.iOS.csproj'
          configuration: '$(buildConfiguration)'
          packageApp: true
          runNugetRestore: false
          args: '/p:OutputPath=$(outputDirectory)/'
          buildToolOption: 'msbuild'
          clean: true
2
votes

Previously, I selected the build configuration is pointing to the .sln (solution) file instead of the (.iOS) project.

Solution : In the build configuration to be select (.iOS) Project