Quantcast
Viewing latest article 23
Browse Latest Browse All 31

Azure Pipelines: How to install Xamarin components (for iOS & Android) on MacOS13 to make msbuild work in terms of building a C# project

Essentially what the subject says. I need Xamarin components in order to build some Xamarin/iOS libs that can only be build on MacOS (using sharpie etc). Currently I'm using MacOS12 (which does have Xamarin iOS + Android components pre-installed) but once I tried to move to MacOS13 I noticed that alot of stuff in the Xamarin side have been removed:

https://github.com/actions/runner-images/blob/main/images/macos/macos-12-Readme.md

vs

https://github.com/actions/runner-images/blob/main/images/macos/macos-13-Readme.md

I'm just wondering whether there's an easy way to reintroduce the Xamarin stuff (iOS and Android) manually from the command line in the MacOS13 image. For example I managed to install mono like so:

wget    https://download.mono-project.com/archive/6.12.0/macos-10-universal/MonoFramework-MDK-6.12.0.182.macos10.xamarin.universal.pkgsudo    installer    -target /    -pkg MonoFramework-*.pkgsudo   sh -c   "echo   '\n\nexport PATH=\"/Library/Frameworks/Mono.framework/Versions/Current/bin:\$PATH\"\n\n'>> ~/.bash_profile"source    ~/.bash_profile

How can I achieve something similar for the Xamarin iOS+Android components?

My C# .csproj essentially employs this bit:

<Project Sdk="MSBuild.Sdk.Extras/3.0.44"><TargetFrameworks>monoandroid12.0;xamarin.ios10;</TargetFrameworks></Project>

I have already enriched the agent with a demand to install Xamarin.Android like so:

pool:    name: Azure Pipelines    demands:        - msbuild        - Xamarin.Android

But this doesn't do the trick - I still get an error during my msbuild about android and ios xamarin stuff missing:

/Users/runner/.nuget/packages/msbuild.sdk.extras/3.0.44/Build/LanguageTargets/CheckMissing.targets(44,5): error : The specified language targets for monoandroid12.0 is missing. Ensure correct tooling is installed for 'monoandroid'. Missing: '/Library/Frameworks/Mono.framework/Versions/6.12.0/lib/mono/xbuild/Xamarin/Android/Xamarin.Android.Bindings.targets' [/Users/runner/work/1/s/bindings/foo.csproj]

Viewing latest article 23
Browse Latest Browse All 31

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>