Skip to content

Conversation

@drasticactions
Copy link
Contributor

.NET 10 MAUI introduced a new internal implementation of IAlertManagerSubscription. This includes a standard implementation with a NotImplementedException for CreateSubscription.

private partial IAlertManagerSubscription CreateSubscription(IMauiContext mauiContext)
{
throw new NotImplementedException();
}

This creates a problem if you are using .NET implementations of the controls from outside the standard .NET MAUI UI TFMs (Such as test cases for controls outside of the MAUI repo). Window calls on an internal AlertManager implementation,

void OnPageHandlerChanged(object? sender, EventArgs e)
{
ModalNavigationManager.PageAttachedHandler();
AlertManager.Subscribe();
}

This calls on that standard AlertManager, which then fails with a not implemented exception. in .NET 9 and previous, this would no-op.

Returning the stub AlertManagerHelper fixes this and lets it continue. For 99.999% of users (scientifically speaking), they shouldn't notice a difference in behavior.

Copilot AI review requested due to automatic review settings November 15, 2025 13:39
@dotnet-policy-service dotnet-policy-service bot added the community ✨ Community Contribution label Nov 15, 2025
@dotnet-policy-service
Copy link
Contributor

Hey there @@drasticactions! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes a regression in .NET 10 MAUI where the standard AlertManager implementation throws NotImplementedException when CreateSubscription is called. This breaks test scenarios where MAUI controls are used outside the standard MAUI UI TFMs without dependency injection services configured.

Key changes:

  • Returns a no-op AlertRequestHelper stub instead of throwing NotImplementedException in the standard AlertManager
  • Aligns with .NET 9 behavior where this scenario would silently no-op
  • Matches the pattern of platform-specific implementations (Android, iOS, Windows, Tizen) which all return concrete instances

@PureWeen PureWeen changed the base branch from main to inflight/current November 18, 2025 21:59
@PureWeen PureWeen merged commit f958eed into dotnet:inflight/current Nov 18, 2025
6 of 7 checks passed
@PureWeen PureWeen added the area-controls-dialogalert DisplayAlert, dialog label Dec 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-controls-dialogalert DisplayAlert, dialog community ✨ Community Contribution

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants