Add NuGet to macOS 13 Package Management tools
Tool name
NuGet
Tool license
Free
Add or update?
- [X] Add
- [ ] Update
Desired version
latet
Approximate size
No response
Brief description of tool
Used for packing .Net applications. It is available in the macOS 12 image and would be needed in the macOS 13 image as well.
URL for tool's homepage
https://www.nuget.org/downloads
Provide a basic test case to validate the tool's functionality.
No response
Platforms where you need the tool
- [X] Azure DevOps
- [X] GitHub Actions
Runner images where you need the tool
- [ ] Ubuntu 20.04
- [ ] Ubuntu 22.04
- [ ] macOS 11
- [ ] macOS 12
- [X] macOS 13
- [ ] Windows Server 2019
- [ ] Windows Server 2022
Can this tool be installed during the build?
No response
Tool installation time in runtime
No response
Are you willing to submit a PR?
No response
Hi, Georgi. MacOS 13 runners are still in beta and bundled set of tools is reduced for testing purposes.
Nuget is installed as a part of the Mono Framework. You can install it manually using this script:
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 /
Are there any updates on when Nuget and Mono may be added to the macOS-13 image?
To run iOS 17 simulators for testing Xamarin apps you need to have Xcode 15 installed, which in turn can only be installed on macOS-13 (>=13.4)
So for development I am now using macOS-13 and would ideally like the pipelines to be inline with the the environment I develop on if possible.
We added mono (and Nuget) from Xamarin package as it is the official way currently, even though Xamarin slowly reaches EOL. It will be released next week.
Deployed
I'm getting the following error when building my Xamarin project on the macOS 13 image:
error MSB4226: The imported project "/Library/Frameworks/Mono.framework/Versions/6.12.0/lib/mono/xbuild/Xamarin/iOS/Xamarin.iOS.CSharp.targets" was not found. Also, tried to find "Xamarin/iOS/Xamarin.iOS.CSharp.targets" in the fallback search path(s) for $(MSBuildExtensionsPath) - "/Library/Frameworks/Mono.framework/External/xbuild/" . These search paths are defined in "/Library/Frameworks/Mono.framework/Versions/6.12.0/lib/mono/msbuild/Current/bin/MSBuild.dll.config". Confirm that the path in the
declaration is correct, and that the file exists on disk in one of the search paths.
The import uses $(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets.
From what I can tell in #8342, this path should exist now. Am I missing something?
@mikhailkoliada Unfortunately macOS-13 still doesn't contain the Xamarin symlinks, so we can't build our Xamarin projects with this, we still have to use macOS-12. Xamarin has been updated to support Xcode 15 btw, so no reason not to add to the Mac host.
@mikhailkoliada any update on this issue? Xamarin is still supported, our entire .NET Maui migration contingency plan revolves around being able to build with Xcode 15, which requires macOS-13 build hosts...
According to https://devblogs.microsoft.com/dotnet/announcing-dotnet-maui-in-dotnet-8-rc-2/#bonus-2-xcode-15-and-android-api-34 The .NET8 SDK RC2 is what is needed to compile XF5 apps with xcode 15 or am I reading that incorrectly?
Assuming this is going to work and it's what we have been planning on since late october we need to first ensure we have xcode 15 build capability in our AzDo pipelines.
I get that .NET 8 hasn't been released yet but can you give us an idea how long after release you will have this vmImage up to date?
Is there any update on this? The Xamarin.iOS DevOps pipeline task won't build on the macos-13 image because MSBuild (mono) is not installed.
Error: Xamarin.iOS task failed with error MSBuild or xbuild (Mono) were not found on the macOS or Linux agent
Any update on this or workaround? thanks
I don't know why but the official MS position seems to be "XF is not being supported past Spring 24 so we will not be adding them to the images".
The workaround is to install them as part of your pipeline. Here is some of our YAML iOS CI
- bash: 'brew install --cask xamarin-ios'
displayName: 'Install missing Xamarin iOS components'
- bash: 'brew install --cask xamarin-android'
displayName: 'Install missing Xamarin Android components'
- bash: |
echo '##vso[task.setvariable variable=MD_APPLE_SDK_ROOT;]'/Applications/Xcode_15.0.1.app;sudo xcode-select --switch /Applications/Xcode_15.0.1.app/Contents/Developer
displayName: 'Select XCode Version'
@munkii thank you for your reply.. I have never used brew., That fixed the issue!!! THANK YOU
I really I can finish the Maui app in time , as the next big issue is the lack of the privacy manifest , which is now mandatory from april and I dont think xamarin will support it.
@munkii OMG, a lifesaver! MAUI conversion has been a nightmare, and we still have features to push out in the meantime. THANK YOU! THANK YOU! THANK YOU!
@munkii Thank you so much! Your solution worked perfectly!