Introduction

Migrating a production-grade .NET MAUI application from .NET 9 to .NET 10 is a significant undertaking that requires careful planning, a thorough understanding of breaking changes, and diligent validation across all supported platforms. .NET 10 introduces major improvements in performance, diagnostics, and developer productivity, but also includes critical breaking changes, deprecated APIs, and updated platform requirements that must be addressed to ensure a smooth transition and continued production stability.

This guide provides a comprehensive, step-by-step approach to upgrading your .NET MAUI project, including prerequisites, environment setup, SDK and workload updates, project file changes, platform-specific migration steps, testing strategies, CI/CD considerations, and best practices for a robust migration.

This article covers:

1. Prerequisites and Environment Setup

1.1 Supported Operating Systems and Hardware

Ensure your environment meets minimum requirements:

These apply to both developer machines and CI/CD agents.

1.2 Development Tools

Install Workloads

dotnet workload install maui
dotnet workload install android
dotnet workload install ios
dotnet workload install maccatalyst
dotnet workload install windows

Verify:

dotnet --version
dotnet workload list

1.3 Backup and Source Control

2. SDK, Workloads, and Tooling Changes

2.1 .NET 10 Workload Model

2.2 NuGet Package Compatibility

Update all packages:

dotnet list package --outdated

Key updates:

3. Updating .csproj and Target Frameworks

3.1 Target Frameworks

<PropertyGroup>
  <TargetFrameworks>net10.0-android;net10.0-ios;net10.0-maccatalyst;net10.0-windows10.0.19041.0</TargetFrameworks>
</PropertyGroup>

Conditional TFMs for OS-specific builds supported.

3.2 Platform Version Properties

<SupportedOSPlatformVersion Condition="'$(TargetFrameworkIdentifier)'=='android'">24.0</SupportedOSPlatformVersion>

(Repeat for iOS, macOS, Windows.)

3.3 Additional Project Updates

<MauiXamlInflator>SourceGen</MauiXamlInflator>
<WindowsPackageType>None</WindowsPackageType>

4. Breaking Changes and Deprecated APIs

Major removals and replacements:

AreaChangeReplacement
MessagingCenterRemovedWeakReferenceMessenger
ListView/TableViewDeprecatedCollectionView
Animation methodsSync deprecatedAsync versions
DisplayAlertSync deprecatedDisplayAlertAsync
Page.IsBusyDeprecatedActivityIndicator
MediaPickerOld methods deprecatedPickPhotosAsync
Application.MainPageDeprecatedCreateWindow override

5. Platform-Specific Migration

5.1 Android

5.2 iOS and Mac Catalyst

5.3 Windows

5.4 macOS

6. Code Migration Examples

MessagingCenter → WeakReferenceMessenger

WeakReferenceMessenger.Default.Send(new UserLoggedInMessage(user));

ListView → CollectionView

Use DataTemplates with CollectionView.

Animation APIs

await button.FadeToAsync(0, 500);

MediaPicker

var photos = await MediaPicker.PickPhotosAsync(new MediaPickerOptions { SelectionLimit = 1 });

7. Testing and Validation

8. CI/CD Updates

9. Performance and Diagnostics

New metrics:

OpenTelemetry supported for tracing and monitoring.

10. Migration Checklist

  1. Backup project

  2. Install SDK & workloads

  3. Update TFMs

  4. Update packages

  5. Replace deprecated APIs

  6. Update manifests

  7. Clean and rebuild

  8. Test all platforms

  9. Update CI/CD

  10. Monitor production

11. Troubleshooting

Common issues include MessagingCenter removal, ListView deprecation, SDK mismatch errors, Android minSdk conflicts, Windows startup errors, and trimmer warnings.

12. Best Practices

13. Automation Scripts

PowerShell TFM Update

Get-ChildItem -Recurse -Filter *.csproj | ForEach-Object {
 (Get-Content $_.FullName) -replace 'net9.0', 'net10.0' | Set-Content $_.FullName
}

14. Conclusion

Migrating from .NET 9 to .NET 10 in a .NET MAUI application unlocks performance, diagnostics, and tooling improvements, but requires disciplined upgrades across code, dependencies, platforms, and pipelines. With structured planning, testing, and observability, you can ensure a stable, production-ready transition.