-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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 CS0234: The type or namespace name 'Compatibility' does not exist in the namespace 'Microsoft.Maui.Controls.Platform' #20565
Comments
We're witnessing the same errors in our iOS pipeline. The same pipeline with unchanged sources built just fine on Monday but is throwing these errors today. As a further hint: Our build step "Workload install" which consists of the command
The output on Monday was:
Looks like .Net 8 workloads are suddenly aligned with RC1 packs? |
We are also expericing issues with 8.0.200 when building iOS, seeing similar issues as @DDHSchmidt that wrong workloads are install from the nuget source. |
8.0.200 also broke some stuff in our iOS pipeline since yesterday. We are having message similar to this
It was working fine for 8.0.101. Putting them here since they might be related the issue you are describing. |
Same issue here - our MacCatalyst builds suddenly started failing on DevOps following the release of The YAML we are using to install, in case it's useful, is as follows:
Where we ask for |
As mentioned previous in this thread, it seems like the MAUI workloads included with the new Visual Studio 2022 17.9 is correct which is why local builds work
It is only when installing the MAUI workload directly in a command line during a pipeline build the wrong packages are resolved maybe due to wrong manifests somewhere, it is both MAUI, Android and iOS packages where 8.0.0-RC1 packages are being installed. This is the output when a MAUI workload is installed on the following version of the windows-2022 Azure runner image '20240211.1.0' with this command "dotnet workload install maui". Before this the .NET 8.0.2 SDK was installed.
It would be nice if someone from the .NET team acknowledged they are aware of the problem, so we are not left in the dark as it is pretty critical that all MAUI build pipelines will either fail or build with old .NET versions unless versions are hardcoded in your build pipeline. |
Looking at my local ~/.dotnet folder, the 8.0.200 'AdvertisedManifestFeatureBand.txt' file in microsoft.dotnet.sdk.maui is still saying 8.0.101 [looks like the same is true for many of the other workloads as well]. Not sure if this is part of the issue or not, but throwing my hat in the ring of people who are now broken after the latest update. Local builds work just fine, even from the command line, DevOps agent builds fail. Looking at our build logs, it looks like all three platforms [iOS, Android and Windows] are having the same workload install problem, but only iOS is erroring out. I've also updated our iOS build to use Xcode 15.2, but that didn't resolve anything either. |
Just to add that I am seeing this issue locally after updating VS for Mac, dotnet and dotnet workloads. For me it's causing a custom handler issue in that it can't find iOS and macOS related handler overrides or color extensions. |
I think the issue is that the 8.0.200 SDK has older ios/android/maui workloads... somehow... and as a result, the older iOS cannot load the newer/current maui/ios nugets. If you use a global.json for now to pin to 8.0.101 or make sure you use that version on CI, it should start working again. Investigations into why, how, and what happened is still ongoing, and a fix will hopefully be found ASAP. |
Can confirm, saw this happening in one of my plugin repositories jfversluis/Plugin.Maui.ScreenRecording#15 |
Please see #20600 |
I received an update for VS For Mac today. After installing this update the problem is now happening on there as well. I don't have the 'use prerelease' option checked but for some reason it looks like it is using prerelease versions. So now no way to develop on Mac until this is fixed. |
Duplicate of #20600 and a fix is available for the hosted build agents without the need for any other changes. Installing .NET 8.0.201 should also fix it for VS for Mac I would assume. |
Description
This morning all our Maui builds started failing in Azure Devops build pipelines with the above error.
From what I can see there were no code changes.
Builds fine on local PC and Macbook, so this appears to be only happening in Devops.
Edit: I received an update for VS For Mac today. After installing this update the problem is now happening on there as well. I don't have the 'use prerelease' option checked but for some reason it looks like it is using prerelease versions.
Steps to Reproduce
Create a build pipeline in devops
Run pipeline
Link to public reproduction project repository
N/A
Version with bug
8.0.3 GA
Is this a regression from previous behavior?
Yes, this used to work in .NET MAUI
Last version that worked well
8.0.3 GA
Affected platforms
iOS
Affected platform versions
iOS
Did you find any workaround?
No
Relevant log output
The text was updated successfully, but these errors were encountered: