<p>It looks like your problem references this issue <a href="https://github.com/actions/runner-images/issues/7635" rel="nofollow noreferrer">#7635</a>.</p>
<p>According to this <a href="https://github.com/actions/runner-images/issues/7635#issuecomment-1562501528" rel="nofollow noreferrer">post</a> you can use:</p>
<pre><code>VERSION=6.12.0.182
MONO_FOLDER_NAME=$(echo $VERSION | cut -d. -f 1,2,3)
PKG_URL=&quot;https://download.mono-project.com/archive/${MONO_FOLDER_NAME}/macos-10-universal/MonoFramework-MDK-${VERSION}.macos10.xamarin.universal.pkg&quot;
PKG_NAME=${PKG_URL##*/}
curl -4fsLo &quot;${PKG_NAME}&quot; &quot;${PKG_URL}&quot;
sudo installer -pkg &quot;${PKG_NAME}&quot; -target /
</code></pre>
<p>Please share your experience if you managed to solve the problem.</p>

CC BY-SA 4.0
2023-08-02T15:36:28.650Z
Will this also install the Android / iOS components needed for my solution to build properly? (it's not clear to me whether this installs just mono or mono + android/ios libs)
XDS
CC BY-SA 4.0
2023-08-02T14:50:13.533Z
2023-08-02T14:50:13.533Z
Denis
<p>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:</p>
<p><a href="https://github.com/actions/runner-images/blob/main/images/macos/macos-12-Readme.md" rel="nofollow noreferrer">https://github.com/actions/runner-images/blob/main/images/macos/macos-12-Readme.md</a></p>
<p>vs</p>
<p><a href="https://github.com/actions/runner-images/blob/main/images/macos/macos-13-Readme.md" rel="nofollow noreferrer">https://github.com/actions/runner-images/blob/main/images/macos/macos-13-Readme.md</a></p>
<p>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:</p>
<pre><code>wget    https://download.mono-project.com/archive/6.12.0/macos-10-universal/MonoFramework-MDK-6.12.0.182.macos10.xamarin.universal.pkg

sudo    installer    -target /    -pkg MonoFramework-*.pkg

sudo   sh -c   &quot;echo   '\n\nexport PATH=\&quot;/Library/Frameworks/Mono.framework/Versions/Current/bin:\$PATH\&quot;\n\n'   &gt;&gt; ~/.bash_profile&quot;

source    ~/.bash_profile
</code></pre>
<p>How can I achieve something similar for the Xamarin iOS+Android components?</p>
<p>My C# .csproj essentially employs this bit:</p>
<pre><code>&lt;Project Sdk=&quot;MSBuild.Sdk.Extras/3.0.44&quot;&gt;
    &lt;TargetFrameworks&gt;monoandroid12.0;xamarin.ios10;&lt;/TargetFrameworks&gt;
&lt;/Project&gt;
</code></pre>
<p>I have already enriched the agent with a demand to install Xamarin.Android like so:</p>
<pre><code>pool:
    name: Azure Pipelines
    demands:
        - msbuild
        - Xamarin.Android
</code></pre>
<p>But this doesn't do the trick - I still get an error during my msbuild about android and ios xamarin stuff missing:</p>
<pre><code>/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]
</code></pre>

<azure-devops><azure><azure-pipelines><macos>
Azure Pipelines: How to install Xamarin components (for iOS & Android) on MacOS13 to make msbuild work in terms of building a Xamarin/C# project
XDS
# Azure Pipelines: How to install Xamarin components (for iOS & Android) on MacOS13 to make msbuild work in terms of building a Xamarin/C# project

(Asked by: username_0 on 2023-05-12)

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.pkg

sudo    installer    -target /    -pkg MonoFramework-*.pkg

sudo   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:

    monoandroid12.0;xamarin.ios10;


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]

**Tags:** azure-devops, azure, azure-pipelines, macos


---

## 1 answers

### Answer by username_1 on 2023-08-02. Score: 1 | Accepted answer

It looks like your problem references this issue #7635.
According to this post you can use:
VERSION=6.12.0.182
MONO_FOLDER_NAME=$(echo $VERSION | cut -d. -f 1,2,3)
PKG_URL="https://download.mono-project.com/archive/${MONO_FOLDER_NAME}/macos-10-universal/MonoFramework-MDK-${VERSION}.macos10.xamarin.universal.pkg"
PKG_NAME=${PKG_URL##*/}
curl -4fsLo "${PKG_NAME}" "${PKG_URL}"
sudo installer -pkg "${PKG_NAME}" -target /

Please share your experience if you managed to solve the problem.

> **Comments:**
> **username_0**: Will this also install the Android / iOS components needed for my solution to build properly? (it's not clear to me whether this installs just mono or mono + android/ios libs)  

---

