Answers: <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>
  
Answers: CC BY-SA 4.0
Answers: 2023-08-02T15:36:28.650Z
Answers: 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)
Answers: XDS
Answers: CC BY-SA 4.0
Answers: 2023-08-02T14:50:13.533Z
Answers: 2023-08-02T14:50:13.533Z
Answers: Denis
Body: <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>
  
Tags: <azure-devops><azure><azure-pipelines><macos>
Title: Azure Pipelines: How to install Xamarin components (for iOS & Android) on MacOS13 to make msbuild work in terms of building a Xamarin/C# project
UserDisplayName: XDS
ThreadText: # 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:
  
  ```
  <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]
  
  ```
  
  **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](https://github.com/actions/runner-images/issues/7635).
  
  According to this [post](https://github.com/actions/runner-images/issues/7635#issuecomment-1562501528) 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)  
  
  ---
  
  