Description
Maui app run with Exception Unhandled "System.StackOverflowException: 'Exception of type 'System.StackOverflowException' was thrown.'" when change maui control to 8.0.40-nightly.10537
Binlogging: BuildLoggin.zip
Steps to Reproduce
- Add maui-nightly "https://pkgs.dev.azure.com/xamarin/public/_packaging/maui-nightly/nuget/v3/index.json" feed to your local Nuget.config file.
- Created Maui project or use https://github.com/rachelkang/recipeSearch project.
- Open .csproject file replace the package version for Microsoft.Maui.Controls & Microsoft.Maui.Controls.Compatibility to 8.0.40-nightly.10537+sha.b0e562e532-azdo.9451576
- Wait for package loading to complete, then run with windows machine, or android device.

Link to public reproduction project repository
https://github.com/rachelkang/recipeSearch
Version with bug
8.0.40-nightly.10537
Is this a regression from previous behavior?
Yes, this used to work in .NET MAUI
Last version that worked well
8.0.20 SR4/ 8.0.40-nightly.10515+sha.d6a3c50c93-azdo.9437127
Affected platforms
Android, Windows
Relevant log output
Expecption Unhandled
System.StackOverflowException
HResult=0x800703E9
Message=Exception of type 'System.StackOverflowException' was thrown.
Microsoft.Maui.dll!Microsoft.Maui.EnumerableExtensions.IndexOf<Microsoft.VisualStudio.DesignTools.MauiTap.WindowContext>(System.Collections.Generic.IEnumerable<Microsoft.VisualStudio.DesignTools.MauiTap.WindowContext> enumerable, System.Func<Microsoft.VisualStudio.DesignTools.MauiTap.WindowContext, bool> predicate) Unknown
Microsoft.Maui.dll!Microsoft.Maui.EnumerableExtensions.IndexOf<Microsoft.VisualStudio.DesignTools.MauiTap.WindowContext>(System.Collections.Generic.IEnumerable<Microsoft.VisualStudio.DesignTools.MauiTap.WindowContext> enumerable, System.Func<Microsoft.VisualStudio.DesignTools.MauiTap.WindowContext, bool> predicate) Unknown
[The 1 frame(s) above this were repeated 5655 times]
Microsoft.Maui.Controls.HotReload.Forms.dll!Microsoft.VisualStudio.DesignTools.MauiTap.ElementSelectionManager.RegisterWindow(Microsoft.Maui.IWindow window) Unknown
Microsoft.Maui.Controls.HotReload.Forms.dll!Microsoft.VisualStudio.DesignTools.MauiTap.ElementSelectionManager.Initialize() Unknown
Microsoft.Maui.dll!Microsoft.Maui.Dispatching.Dispatcher.DispatchImplementation.AnonymousMethod__0() Unknown
Microsoft.InteractiveExperiences.Projection.dll!ABI.Microsoft.UI.Dispatching.DispatcherQueueHandler.Do_Abi_Invoke(nint thisPtr) Unknown
[Native to Managed Transition]
[Managed to Native Transition]
Microsoft.WinUI.dll!ABI.Microsoft.UI.Xaml.IApplicationStaticsMethods.Start(WinRT.IObjectReference _obj, Microsoft.UI.Xaml.ApplicationInitializationCallback callback) Unknown
Microsoft.WinUI.dll!Microsoft.UI.Xaml.Application.Start(Microsoft.UI.Xaml.ApplicationInitializationCallback callback) Unknown
> MauiApp5.dll!MauiApp5.WinUI.Program.Main(string[] args) Line 31 C#
Description
Maui app run with Exception Unhandled "System.StackOverflowException: 'Exception of type 'System.StackOverflowException' was thrown.'" when change maui control to 8.0.40-nightly.10537
Binlogging: BuildLoggin.zip
Steps to Reproduce
Link to public reproduction project repository
https://github.com/rachelkang/recipeSearch
Version with bug
8.0.40-nightly.10537
Is this a regression from previous behavior?
Yes, this used to work in .NET MAUI
Last version that worked well
8.0.20 SR4/ 8.0.40-nightly.10515+sha.d6a3c50c93-azdo.9437127
Affected platforms
Android, Windows
Relevant log output