Mobile

How to Migrate Mobile Apps from Xamarin and Xamarin.Forms to .NET MAUI

A step-by-step guide to migrating Xamarin.Forms apps to .NET MAUI 10: prerequisites, tool-assisted and manual options, layouts, renderers and packages.

LinkedIn X

Key takeaways

  • Microsoft ended support for Xamarin on May 1, 2024, so Xamarin apps should move to .NET MAUI. Updated 2026 Xamarin's last versions no longer meet Google Play and App Store requirements, so Xamarin apps can't ship updates.
  • .NET MAUI is the successor to Xamarin.Forms: one project and one codebase for Android, iOS, macOS and Windows. Updated 2026 Migrate to .NET 10 (MAUI 10), the current long-term support release.
  • Before migrating, update the app to Xamarin.Forms 5 and current dependencies.
  • There are two ways to migrate: a migration tool, or a new .NET MAUI project with your code copied in. We combine both. Updated 2026 The .NET Upgrade Assistant is deprecated; the GitHub Copilot modernization agent in Visual Studio replaces it.
  • Plan time for layouts, custom renderers and third-party packages. These take the most effort.

Updated 2026 This guide was first published in March 2024. We've updated it for .NET 10, the current tooling and today's app store requirements. If you're deciding whether and how to move off Xamarin, see Still on Xamarin in 2026?

.NET Multi-platform App UI (.NET MAUI) is the successor to Xamarin.Forms and Microsoft's framework for cross-platform apps with .NET. It lets you write code once and run it on Android, iOS, macOS and Windows. .NET MAUI is based on Xamarin.Forms, but it brings many improvements:

  • A single project instead of one project per platform.
  • A unified app model for creating and configuring apps across platforms.
  • A modernized control library built on native controls, with support for customization.
  • A new handler architecture that improves performance and reduces app size.
  • Community toolkits with additional controls, behaviors and utilities.

Why Xamarin apps need to move

Microsoft ended support for all Xamarin SDKs, including Xamarin.Forms, on May 1, 2024. There are no more bug fixes, security updates or new features. The last Xamarin releases target Android API 34 and Xcode 15. Without a migration, Xamarin apps fall behind the latest Android and iOS versions and, before long, can't be published to the app stores.

Updated 2026 That has now happened. Since April 28, 2026, Apple requires App Store uploads to be built with Xcode 26, and since August 31, 2026, Google Play requires new apps and updates to target Android 16 (API 36). A Xamarin app already in the stores keeps running for now, but you can't publish an update to it, not even a security fix.

If you're still on Xamarin, plan the migration to .NET MAUI now. The rest of this guide covers the steps, and the problems you're likely to hit along the way.

Migration benefits

  • Current .NET and C#. You get the latest C# language features, .NET Hot Reload and the performance work in each .NET release (Performance improvements in .NET 8). Updated 2026 Target .NET 10 today; see Performance improvements in .NET 10.
  • One project, one codebase for all platforms, which simplifies development and maintenance.
  • Native controls and handlers you can customize, plus the community toolkits.
  • A future-proof app that runs on the latest versions of Android and iOS, with ongoing updates from Microsoft and the .NET community.

Updated 2026 Stay current after you migrate, too. Each major version of .NET MAUI is supported for 6 months after the next one ships: MAUI 8 ended in May 2025 and MAUI 9 in May 2026. Plan a yearly upgrade, just as you would for any other .NET app.

Prerequisites

Before you start, make sure you have:

  • Updated 2026 Visual Studio 2026 (or Visual Studio 2022 version 17.14 or later) with the .NET Multi-platform App UI development workload. In 2024 this guide listed Visual Studio 2022 Preview 4 and the maui-check tool. On macOS, use Visual Studio Code with the .NET MAUI extension; Visual Studio for Mac has been retired.
  • Updated 2026 A Mac with Xcode 26 to build and sign the iOS app; the App Store requires it since April 28, 2026.
  • Updated 2026 .NET 10 SDK. Target .NET 10 (MAUI 10). .NET 8 and .NET 9 reach end of support on November 10, 2026.
  • Xamarin.Forms 5.0 in your app. Xamarin.Forms 4.8 is the minimum, but upgrading to 5.0 first removes many differences before you start. Shared code should target .NET Standard 2.0 or later.
  • Up-to-date dependencies. Update your NuGet packages, especially those that have .NET-compatible versions.

Migration options

There are two main ways to migrate a Xamarin.Forms app to .NET MAUI.

1. Tool-assisted upgrade. In 2024 we recommended the .NET Upgrade Assistant, which converts project files, target frameworks, NuGet packages and namespaces, but doesn't produce a single-project MAUI app. Updated 2026 The Upgrade Assistant is now deprecated. Microsoft's replacement is the GitHub Copilot modernization agent, included in Visual Studio 2026 (and Visual Studio 2022 17.14.17 and later). It analyzes your projects and dependencies, proposes a plan, applies code changes and commits each step so you can review it or roll it back. Treat its output as a first pass: review every change, and expect to finish layouts, renderers and packages by hand.

2. New .NET MAUI project. Create a new .NET MAUI project with the same name as your Xamarin.Forms app, then copy in your code files, XAML files, images, fonts and other assets, and update the code to the .NET MAUI APIs. This gives you the most control and a clean single-project structure, but it takes more effort. Microsoft documents the process in Manually upgrade a Xamarin.Forms app.

Our approach combines both. We run the tool first to get the project files, namespaces and package references converted, then create a new single-project MAUI app and move the code across, using the converted project as a reference. Updated 2026 We've used this approach to move client apps such as MyCareCentral for Graham Healthcare Group and OnTheClock from Xamarin to .NET MAUI.

Migration steps

1. Back up and branch. Make sure the Xamarin.Forms app is in source control (such as Git) so you can return to a working state at any point.

2. Update to Xamarin.Forms 5. Update the app and its dependencies to the latest versions and make sure it still runs. This keeps the API differences with .NET MAUI small and moves you onto .NET-compatible package versions where they exist.

3. Convert the project. Use the tool-assisted upgrade, a new MAUI project, or both, as described above.

4. Fix namespaces. Compare the files of the Xamarin.Forms app with the converted MAUI project and make sure the namespaces match Microsoft's migration guidance.

5. Move startup code to MauiProgram. .NET MAUI has a platform-independent startup class, MauiProgram, as the app's entry point. If you've used ASP.NET Core, it will look familiar: an app builder where you register services in the dependency injection container and configure the app. Packages built for MAUI are usually set up in MauiProgram rather than in the platform startup classes (MainApplication and MainActivity on Android, AppDelegate on iOS). Some configuration, such as push notifications, still belongs in those classes. MainActivity and AppDelegate also look quite different from Xamarin's, so compare yours with a new project created from the MAUI template.

6. Update APIs. Most of Xamarin.Essentials is now built into .NET MAUI (see platform integration) and is included automatically with <UseMaui>true</UseMaui> in your project file. To find where an API moved, use the .NET API browser. The Xamarin Community Toolkit is now CommunityToolkit.Maui, with many of the same features. Updated 2026 If you use MessagingCenter, replace it with WeakReferenceMessenger from CommunityToolkit.Mvvm. For lists, CollectionView is the recommended replacement for ListView.

7. Fix layouts.

  • RelativeLayout is removed. Replace it with a Grid or another layout. (The compatibility namespace still lets you use it, but we don't recommend it.)
  • The ...AndExpand options on StackLayout are deprecated. Outside a StackLayout they act as if AndExpand weren't there (FillAndExpand behaves like Fill). Replace them with a Grid, or use the newer HorizontalStackLayout and VerticalStackLayout, which behave like StackLayout with Orientation="Horizontal" or "Vertical", with a few differences.
  • Even without those layouts, the app will look slightly different: margins, padding and the size of elements and text change. You can restore some of Xamarin.Forms' defaults as described in Layout behavior changes from Xamarin.Forms, but expect to adjust screens by hand to make them look as they did.

8. Replace custom renderers with handlers. If a renderer derives from FrameRenderer, ListViewRenderer, ShellRenderer, TableViewRenderer or VisualElementRenderer, you can derive it from the matching class in Microsoft.Maui.Controls.Compatibility to get the app compiling quickly (Reuse custom renderers). The long-term fix is to move each renderer to a handler (Migrate a custom renderer to a handler).

9. Find compatible packages. Getting every library to work in MAUI is often the hardest part, and harder still when you upgrade package versions and the .NET version at the same time. It looks different for every app: some packages have MAUI versions, some have replacements, and for some you'll need to change the code or the source yourself. Our solutions for Firebase and Twilio Video are below.

10. Test on real devices and publish. Test on Android and iOS devices (not just emulators), fix layout and behavior differences, and check the app against your release checklist. Then publish the update to the app stores. Updated 2026 Build with the SDKs the stores require today: Xcode 26 for the App Store, and Android 16 (API 36) as the target for Google Play.

Package migration: Firebase and Twilio Video

These notes come from our migration of MyCareCentral, the patient app we built for Graham Healthcare Group, which uses Firebase, and Twilio Video for its video visits.

Firebase

This applies if your app uses Firebase. You have two options:

  • Keep Microsoft's Firebase binding packages. They're the same packages Xamarin used, so your project will still reference packages whose names start with Xamarin. after the migration.
  • Switch to Plugin.Firebase, a wrapper built for MAUI. It takes more code changes, but the setup is well documented.

With either package, you may run into this build error: "Could not find a part of the path." Some paths in the MAUI build are too long for Windows. In our case Xamarin.Firebase.iOS.CloudMessaging failed to build. To fix it, enable long paths and move the NuGet package folder to a short path:

  1. Close all Visual Studio instances.
  2. Run PowerShell as Administrator and enable long paths:
    New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" -Name "LongPathsEnabled" -Value 1 -PropertyType DWORD -Force
  3. Create a folder C:\nuget.
  4. In PowerShell as Administrator, point NuGet at it:
    [Environment]::SetEnvironmentVariable("NUGET_PACKAGES", "C:\nuget", "Machine")

Twilio Video

This applies if your app uses Twilio for video calls. Twilio doesn't provide an official .NET MAUI library, but there are options:

  • Rebuild the video screens "the MAUI way" with The49.Twilio.Video, a community package.
  • Reuse your Xamarin custom renderers with just the binding projects from that repository (The49.Twilio.Video.iOS and The49.Twilio.Video.Android). You'll change some references and possibly some code to match Twilio Video API changes. When upgrading from an older Twilio version, replace AddRenderer() with AddSink().

If you reference the binding projects directly, Visual Studio may not recognize their namespaces. Reference the built DLL from the binding project instead.

Conclusion

.NET MAUI is the future of cross-platform app development with .NET. If you're using Xamarin.Forms, plan your migration to .NET MAUI as soon as possible. The tools help with the first pass, but plan for testing and manual fixes, especially for layouts, custom renderers and third-party packages.

Updated 2026 The app stores have now made the decision for you: without a migration, a Xamarin app can't be updated. Once you're on .NET MAUI, keep it current with a yearly upgrade.

Updated 2026 For a broader look at your options, including when a rewrite makes more sense than a migration, see Still on Xamarin in 2026? If you'd like help planning or doing the migration, talk to our .NET MAUI developers.

Frequently asked questions

Updated 2026 Added in October 2026; the answers reflect the current versions and store requirements.

Is Xamarin still supported?

No. Microsoft ended support for all Xamarin SDKs, including Xamarin.Forms, on May 1, 2024. There are no more bug fixes, security updates or support for new Android and iOS versions.

Can I still publish updates to a Xamarin app?

Not to the app stores. Xamarin's last versions target Android API 34 and Xcode 15. Google Play now requires updates to target Android 16 (API 36), and the App Store requires builds made with Xcode 26.

Which .NET version should I migrate to?

.NET 10, with .NET MAUI 10. .NET 8 and .NET 9 reach end of support on November 10, 2026, and MAUI 8 and 9 are already out of support.

Is there a tool that migrates a Xamarin app automatically?

Not completely. The GitHub Copilot modernization agent in Visual Studio, which replaced the deprecated .NET Upgrade Assistant, handles much of the project and code conversion. Layouts, custom renderers and third-party packages still need manual work and testing.

Do I need to rewrite my app to move to .NET MAUI?

Usually not. .NET MAUI is based on Xamarin.Forms, so most of your C# code and much of your XAML carries over. The work is in the project structure, layouts, renderers and packages.


Planning a Xamarin migration? Contact us and we'll review your app and plan the move with you.

Written by Greg Kabacinski & Rutul Mehta

For SharpQuest, Troy, Michigan.

Join the discussion

No comments yet.

Leave a Reply




Planning a mobile app?

Talk to an engineer at our Troy, Michigan office about your iOS or Android app.

Get new articles by email

One email when we publish. No other mail.

Subscribe to the latest news and updates by email