Build and run Maui app from dotnet cli on mac

Brad Rice 20 Reputation points
2025-09-29T18:42:08.6366667+00:00

I have dotnet 10 installed on my mac. Running dotnet --version yields this:

10.0.100-rc.1.25451.107

I have also installed the sdk, but when I run

dotnet build -t:Run -f net10.0-ios

I get this error:

MyMauiApp net10.0-ios failed with 1 error(s) (0.2s)

/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk.net10.0_18.5/18.5.10727-net10-rc.1/targets/Xamarin.Shared.Sdk.targets(2330,3): error This version of .NET for iOS (18.5.10727-net10-rc.1) requires Xcode 16.4. The current version of Xcode is 26.0. Either install Xcode 16.4, or use a different version of .NET for iOS. See https://aka.ms/xcode-requirement for more information.

It was my understanding the dotnet 10 was compatible with current Xcode studio. Can anyone help?

Developer technologies | .NET | .NET MAUI
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Michael Le (WICLOUD CORPORATION) 5,930 Reputation points Microsoft External Staff Moderator
    2025-09-30T03:09:54.66+00:00

    Hello Brad,

    Thank you for reaching out.

    The error message you are receiving points directly to a version incompatibility. As it states:

    This version of .NET for iOS (18.5.10727-net10-rc.1) requires Xcode 16.4. The current version of Xcode is 26.0.
    

    This happens because each version of the .NET for iOS SDK is built to work with a specific version of Apple's native toolchain (Xcode). Your current .NET SDK is a release candidate (rc.1) that was specifically paired with Xcode 16.4.

    But .NET 10 is out now, so you shouldn’t run into this issue anymore with Xcode 26. For the best experience with .NET 10, I’d suggest using Visual Studio 2026.

    I hope this helps.

    1 person found this answer helpful.

  2. Starry Night 615 Reputation points
    2025-09-30T02:24:28.8966667+00:00

    From the document Xcode requirement, we could find that :

    A new version of a workload might require a different version of Xcode. This typically happens whenever Apple releases a new version of Xcode: soon afterwards we release new versions of the workloads, supporting the new version of Xcode. Updating the workloads will thus end up requiring a new version of Xcode.

    This often manifests with a build error like the problem you are encountering.

    The simplest solution is typically to upgrade to the version of Xcode the error message mentions.

    It's also possible to install an older version of the corresponding workload to avoid having to upgrade Xcode.

    In some cases the newer version of Xcode also requires updating to a newer major version of macOS (this generally occurs around April every year). If the new macOS version isn't supported on the developer's current hardware, the only option is to use an older version of the workload (or get new hardware).

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.