dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
22.24k stars 1.76k forks source link

Issue with .NET MAUI Microsoft.Maui.Controls 9.0 Update. Error (CS0246) #25835

Open tecomunico opened 1 day ago

tecomunico commented 1 day ago

Description

Hi everyone,

I am experiencing an issue after updating Microsoft.Extensions.Logging.Debug, Microsoft.Maui.Controls, Microsoft.Maui.Controls.Compatibility, etc., from version 8.0.93 to 9.0. The error specifically appears in the AppDelegate class for iOS. The line causing the problem is:

public class AppDelegate : MauiUIApplicationDelegate

The error message I am receiving is:

Platforms/iOS/AppDelegate.cs(28,28): Error CS0246: The type or namespace name 'MauiUIApplicationDelegate' could not be found (are you missing a using directive or an assembly reference?) (CS0246)

I have tried troubleshooting this issue on different machines, but the problem persists across all of them. I even created a completely new MAUI project, and the error still appears immediately after updating to version 9.0. It seems like the update is causing this problem, and I cannot proceed with iOS builds because of it.

Has anyone found a solution or workaround for this? Any help would be greatly appreciated, as this is really blocking our progress.

Thanks in advance!

Steps to Reproduce

No response

Link to public reproduction project repository

No response

Version with bug

9.0.0 GA

Is this a regression from previous behavior?

Yes, this used to work in .NET MAUI

Last version that worked well

8.0.100 SR10

Affected platforms

iOS

Affected platform versions

iOS 15 Pro Max 17.0 Visual Studio for Mac 17.6.14 (build 413)

Did you find any workaround?

No response

Relevant log output

similar-issues-ai[bot] commented 1 day ago

We've found some similar issues:

If any of the above are duplicates, please consider closing this issue out and adding additional context in the original issue.

Note: You can give me feedback by 👍 or 👎 this comment.

Zhanglirong-Winnie commented 1 day ago

Hi, @tecomunico Microsoft.Maui.Controls and Microsoft.Maui.Controls.Compatibility rely on the .NET 9 SDK. You need to install the .NET 9 SDK and the corresponding .NET 9 MAUI Workload on your machine. Download .NET 9.0 (Linux, macOS, and Windows) (microsoft.com). Please try to see if this solves your problem and give us feedback. We look forward to your reply.