maui: Upgrading to 8.0.0-rc.2.9511 breaks the app. Loses references to MauiUIApplicationDelegate
Issue moved from dotnet/sdk#36667
- Please respond to @fady-intelligencex.
From @fady-intelligencex on Saturday, November 4, 2023 7:01:32 PM
Description
Once I upgraded to 8.0.0-rc.2.9511, the app stopped building with the Error CS0246: The type or namespace name ‘MauiUIApplicationDelegate’ could not be found (are you missing a using directive or an assembly reference?) (CS0246). To validate, I created a new project. It works fine with the a previous version, but once I upgrade, it has the same problem.
Steps to Reproduce
- Create new project in maui .net 8.0
- Run the project
- Update Microsoft.Maui.Controls to 8.0.0-rc-2.9511
- Attempt to run project
- see error in the build output.
under Platforms/iOS/ in the file AppDelegate.cs
using Foundation;
namespace newtest4;
[Register(“AppDelegate”)] public class AppDelegate : MauiUIApplicationDelegate { protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp(); }
It cannot find: MauiUIApplicationDelegate
I shared a video link where I demo it happening on a new project.
Link to public reproduction project repository
Version with bug
8.0.0-rc.2.9511
Is this a regression from previous behavior?
Yes, this used to work in .NET MAUI
Last version that worked well
8.0.0-rc.1.9171
Affected platforms
iOS
Affected platform versions
No response
Did you find any workaround?
N/A
Relevant log output
Projects/newtest4/newtest4/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) (newtest4)
About this issue
- Original URL
- State: closed
- Created 8 months ago
- Comments: 18 (8 by maintainers)
I have this issue as well.
Just installed .NET 8 GA with the workloads below, but still issues.
Edit: It seems like the same issue is also happening to
ViewRenderer.