Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add NuGet to macOS 13 Package Management tools #7635

Closed
4 of 11 tasks
GeorgeDarakchiev opened this issue May 25, 2023 · 14 comments
Closed
4 of 11 tasks

Add NuGet to macOS 13 Package Management tools #7635

GeorgeDarakchiev opened this issue May 25, 2023 · 14 comments
Assignees
Labels
Area: Apple awaiting-deployment Code complete; awaiting deployment and/or deployment in progress feature request OS: macOS

Comments

@GeorgeDarakchiev
Copy link

Tool name

NuGet

Tool license

Free

Add or update?

  • 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

  • Azure DevOps
  • GitHub Actions

Runner images where you need the tool

  • Ubuntu 20.04
  • Ubuntu 22.04
  • macOS 11
  • macOS 12
  • 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

@vpolikarpov-akvelon
Copy link
Contributor

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 /

@ISeeBinary
Copy link

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.

@mikhailkoliada mikhailkoliada added the awaiting-deployment Code complete; awaiting deployment and/or deployment in progress label Sep 22, 2023
@mikhailkoliada
Copy link
Contributor

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.

@mikhailkoliada
Copy link
Contributor

Deployed

@gtbuchanan
Copy link

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?

@JohnHDev
Copy link

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

@JohnHDev
Copy link

JohnHDev commented Nov 1, 2023

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

@munkii
Copy link

munkii commented Nov 13, 2023

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?

@jaisongreen
Copy link

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

@gabsamples6
Copy link

Any update on this or workaround? thanks

@munkii
Copy link

munkii commented Mar 1, 2024

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'

@gabsamples6
Copy link

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

@davidschlabach
Copy link

@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!

@philnwoha
Copy link

@munkii Thank you so much! Your solution worked perfectly!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Apple awaiting-deployment Code complete; awaiting deployment and/or deployment in progress feature request OS: macOS
Projects
None yet
Development

No branches or pull requests

13 participants