You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
TodoApp.MAUI: Replace obsolete Page.DisplayAlert with DisplayAlertAsync in AlertService (CS0618) #516
Discovered while adding Windows CI coverage for TodoApp.MAUI in #510 (PR #514, build-samples-todoapp-windows.yml). Building the sample produces a CS0618 obsolete-API warning:
.NET MAUI has deprecated the Task-returning Page.DisplayAlert(string, string, string) overload in favor of Page.DisplayAlertAsync(string, string, string), as part of a broader naming-consistency pass adding an explicit Async suffix to async MAUI APIs. The compiler warning itself names the replacement.
Additional information needed
None — this is a like-for-like rename with an identical signature/return type (Task), so it should be a mechanical, low-risk change. Worth double-checking the DisplayAlertAsync overload signature against the installed Microsoft.Maui.Controls package version (10.0.40, per the .csproj) once picked up, in case the parameter list or overload set differs slightly from DisplayAlert.
Suggested fix
Replace the call with the non-obsolete equivalent:
there is an unrelated bug in the CI at the moment (macos-latest is out of step with the dotnet workloads for ios, which breaks the builds). However, I will fix that (since it is complicated).
Activity
Sahithbasani commentedon Jul 10, 2026
Hi! I'd like to work on this issue. If no one else is already working on it, I'd be happy to submit a PR.
adrianhall commentedon Jul 10, 2026
thank you @Sahithbasani - much appreciated!
there is an unrelated bug in the CI at the moment (macos-latest is out of step with the dotnet workloads for ios, which breaks the builds). However, I will fix that (since it is complicated).
adrianhall commentedon Jul 10, 2026
Fixed in #528