-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
error MT0180: This version of Microsoft.iOS requires the iOS 16.1 SDK (shipped with Xcode 14.1) #6771
Comments
I think the problem lies with the latest version of .Net Maui. I can see that the Maui install Task is installing this version of microsoft.net.sdk.ios.
This is the version used in my last successful build.
|
I'm facing the same issue. Azure Dev Ops pipeline builds are failing that were working earlier this week due to this same error. So I think this is a .Net Maui issue. |
Thank you @faceoffers28 , we will check it, can you provide minimal repro steps? |
Hi @igorboskovic3
|
@gabsamples6 I don't want to ask the obvious question, but you didn't say what XCode version you are using. Did you update to XCode 14.1? Anyway, this issue is about building on an Azure DevOps hosted agent. |
@igorboskovic3 the iOS build with the latest MAUI version doesn't work for us too. - task: Bash@3
displayName: Select xcode version
inputs:
targetType: 'inline'
script: |
sudo xcode-select -s "/Applications/Xcode_14.1.app" The build works fine, but when the "Optimizing assemblies" stuff starts, I get this warning: After some time, it fails with this error:
In the error message it looks like it's using XCode 14.1. |
Starting with the version of VIsual Studio before this last release, I noticed that I couldn't select the version of iOS to use once I selected Asp.net 7. You can see the problem here. It still hasn't been fixed. I assume VS can't determine what version of .Net Maui is installed therefore it can't suggest the correct version of iOS to use. It appears that Microsoft has made the initial release of .Net Maui dependent on iOS 16.0. It also appears that Microsoft has made latest release of .Net Maui dependent on iOS 16.1. I can manually edit the csproj and set iOS to 16.1, as shown below. When I try to Build, using Visual Studio, I get all kinds of errors.
Bottom line, this is really messed up! I'm going to try to work through the 15 errors that were just introduced when I tried to upgrade to iOS 16.1. In the meantime, I'm getting closer to recreating the last successful .Net Maui Build using Azure DevOps. I'll keep experimenting with both seeing as I need to get this app built and uploaded to the App Store before the end of year. |
I changed up my Pipeline to try and recreate the last .Net Maui Build that worked. I'm trying to recreate the initial Asp.net 7.0 .Net Maui environment in Azure DevOps.
Here is the error I'm getting in the DotNetCoreCLI@2 publish Task.
|
I was finally able to get my iOS app to Build using what I think is the configuration for the first .Net Maui release. This does not fix the current problem, but at least I can Build my app again. Here is part of the script that I used. Tell the Pipeline to use Asp.net 7.0.100.
Tell the Pipeline to use .Net Maui 7.0.1xx. https://github.com/dotnet/maui/tree/release/7.0.1xx This is where 7.0.1xx was upgraded to microsoft.net.sdk.ios version 16.0.1478.
Tell the Pipeline to use xamarin-sdk.sh 17_4_0_301. This was the last version of the Xamarin SDK before the upgrade to 17.4.3 .
|
This worked. Thank you! @faceoffers28 |
I was able to get the latest working on GitHub Actions with the following: - name: Set XCode Version
if: runner.os == 'macOS'
shell: bash
run: |
sudo xcode-select -s "/Applications/Xcode_14.1.app"
echo "MD_APPLE_SDK_ROOT=/Applications/Xcode_14.1.app" >> $GITHUB_ENV The I thought it was supposed to use the result of CC: @rolfbjarne |
@mattjohnsonpint we check the following, in order:
|
Thank you @mattjohnsonpint, I can confirm that your solution works also with Azure Pipelines. - task: Bash@3
displayName: Set XCode Version
inputs:
targetType: 'inline'
script: |
sudo xcode-select -s "/Applications/Xcode_14.1.app"
echo "##vso[task.setvariable variable=MD_APPLE_SDK_ROOT;]/Applications/Xcode_14.1.app" |
That makes sense. Just tested and the default currently on the (On the Thus, using |
Hello! Given all the above I am going to close the issue. Unfortunately, unlike GH actions, AzDo does not have a nice way (a task) to switch between xcode versions :(, nothing can be done on our side. |
The advice here worked for me. I use GitHub Actions to build a project based on .NET MAUI 7.x and has Windows and macOS builds to build all 4 main MAUI platforms (Windows, Android, iOS, macOS). Here's what I ended up with in my YML file: |
@Eilon - Hi! 👋 I'm in a similar setup as you. No need to go back to Xcode 14.1 at this point. You can use 14.2, and only a minimal rollback file is needed. See xamarin/xamarin-macios#17561 (comment) It's only Xcode 14.3 that we can't use in Github Actions yet (unless you want to try the The only real problem today is that the latest iOS and MacCatalyst dotnet workloads require Xcode 14.3, so don't work on the |
Description
I'm having major issues after the latest .Net Maui updates. My iOS app will no longer build.
Here is a link to the initial GitHub issue I created. microsoft/azure-pipelines-tasks#17477
After forcing ASP.net to use 7.0.100 and Xamarin to use xamarin-sdk.sh 17_4_0_301, I'm still getting the error.
I even tried to force XCode to version 14.1 using the CmdLine@2 Task.
Does anyone know where this error is coming from? Is this coming from the Maui install? If so, how do I fix this? As-is, I can no longer build my iOS app.
Platforms affected
Runner images affected
Image version and build link
Current image version: '20221204.1'
Is it regression?
Current image version: '20221204.1'
Expected behavior
I would expect for the app to build.
Actual behavior
The app no longer builds.
Repro steps
Try to build a .Net Maui iOS app targeting iOS 16 with the Microsoft Visual Studio Enterprise 2022 (64-bit) - Current
Version 17.4.3 SDKs using the macos-12 image.
The text was updated successfully, but these errors were encountered: