Skip to main content

.NET MAUI vs Xamarin: what changed and how to migrate

By Fernando Arreguín · Published

.NET Multi-platform App UI (.NET MAUI) is the evolution of Xamarin.Forms. It keeps the idea of one C# and XAML codebase for Android, iOS, macOS and Windows, but moves it onto modern .NET. This article compares the two and lists what to weigh before migrating an existing Xamarin app.

Support status

Microsoft’s support for Xamarin ended on May 1, 2024, for all Xamarin SDKs including Xamarin.Forms. Microsoft’s own migration guide opens with this notice, so an app still on Xamarin no longer receives updates or fixes from Microsoft. See the Xamarin support policy and Upgrade from Xamarin to .NET. Check both pages again on the day you read this, since support dates and tooling change.

What changed

  • Runtime and SDK. Xamarin runs on Mono with the Xamarin SDKs. .NET MAUI runs on current .NET with SDK-style projects.
  • Project structure. A Xamarin.Forms solution usually has a shared library plus one project per platform. .NET MAUI offers a single project that targets every platform, with shared resources (images, fonts, app icon, splash screen) declared once. Platform-specific code lives in a Platforms folder. Multi-project layouts are still possible.
  • Namespaces. The default XAML namespace changes from http://xamarin.com/schemas/2014/forms to http://schemas.microsoft.com/dotnet/2021/maui, and Xamarin.Essentials is folded into .NET MAUI.
  • Startup. Configuration moves to a MauiProgram builder that uses the .NET generic host patterns (dependency injection, configuration, handlers).
  • Rendering. Custom renderers give way to handlers, which are lighter and easier to customise.
  • Tooling. Build, debug and hot reload work through current Visual Studio and the .NET CLI.

Migration considerations

Microsoft documents several paths: the .NET Upgrade Assistant, a manual upgrade to a multi-project .NET MAUI app, and a manual upgrade to a single project. The Upgrade Assistant converts project files to SDK style, updates target frameworks and performs common code changes. Microsoft’s documentation says it requires Xamarin.Forms 4.8 or later and recommends Xamarin.Forms 5.0 on .NET Standard 2.0 or higher.

Things that usually need attention:

  1. Third-party packages. Each NuGet package and binding library needs a .NET-compatible version or a replacement.
  2. Custom renderers and effects. Plan to rewrite them as handlers or mappers.
  3. App data. The Xamarin.Forms app properties dictionary does not carry over, so migrate stored values to .NET MAUI preferences.
  4. Platforms. Xamarin.Forms UWP projects move to WinUI 3. Some Xamarin project types, such as Xamarin.watchOS, have no direct upgrade path. Microsoft’s migration page lists which project types can be upgraded.
  5. Platform-specific code. Review native API usage against the current Android and iOS SDK requirements.
  6. Testing. Re-run UI, device and store-submission checks after the upgrade.

When to stay or move

  • Move if the app is still in active use, needs store updates or security patches, or depends on current platform SDKs. Staying on an unsupported SDK has a growing cost.
  • Plan a longer migration if the app depends on many custom renderers, unmaintained packages or platform-specific bindings.
  • Consider alternatives only if cross-platform C# no longer suits the product. That is a separate decision from Xamarin versus .NET MAUI.

Summary

.NET MAUI is Microsoft’s supported path from Xamarin.Forms. The concepts carry over, the project structure and startup code change, and most of the effort goes into dependencies and platform-specific code. If you want help assessing a migration, get in touch.

Sources