Microsoft Unveils Unifying .NET Multi-Platform App UI for Mobile/Desktop
The dream of one cross-platform .NET scheme for every type of project and target is becoming closer to a reality.
For years Microsoft-centric developers have been asking for a “Ubiquitous .NET Client Application Development Model” and “Cross platform UX for .NET 5.”
Today, at Microsoft’s Build developer conference, those goals were advanced with the unveiling of .NET Multi-platform App UI (MAUI), a single-stack UI framework that supports all modern workloads: Android, iOS, macOS, and Windows (but not Linux, other than possible “community” driven support).
MAUI builds upon Xamarin.Forms technology, which already has built-in cross-platform capabilities for targeting iOS and Android mobile apps.
“You master one way to build client apps, the MAUI way, and all platforms are within your reach,” said Scott Hunter, director of program management, .NET, in a post announcing MAUI.
However, developers won’t be able to get their hands on the new tech for a while, as it’s planned to debut in previews starting in the fourth quarter of this year and become generally available with the release of .NET 6 in November 2021, meaning it won’t be part of the big milestone .NET 5 coming this November, designed to further unify all things .NET into one package.
“With .NET 5 we begin our journey of unifying the .NET platform, bringing .NET Core and Mono/Xamarin together in one base class library (BCL) and toolchain (SDK),” Hunter said.
MAUI will be an extension of that effort, featuring a cross-platform API to leverage native features and UI controls on supported platforms while allowing for more code sharing across them and deployment to targets including the desktop, emulators, simulators, or physical devices.
Microsoft had been planning a more accelerated journey to a unified .NET ecosystem, but the COVID-19 pandemic got in the way. As Hunter detailed in another post published today announcing .NET 5 Preview 4:
Last year, we laid out our vision for one .NET and .NET 5. we said we would take .NET Core and Mono/Xamarin implementations and unify them into one base class library (BCL) and toolchain (SDK). In the wake of the global health pandemic, we’ve had to adapt to the changing needs of our customers and provide the support needed to assist with their smooth operations. Our efforts continue to be anchored in helping our customers address their most urgent needs. As a result, we expect these features to be available in preview by November 2020, but the unification will be truly completed with .NET 6, our Long-Term Support (LTS) release. Our vision hasn’t changed, but our timeline has.
Meanwhile, MAUI will provide:
- One project targeting multiple platforms and devices
- One location to manage resources such as fonts and images
- Multi-targeting to organize your platform-specific code
“Finally, you will always have access the native underlying operating system APIs and it will be easier than ever with new platform specific integrations. Under platforms you can add source code files for a specific operating system and access the native APIs. With MAUI everything is in one place where you need it to keep you productive,” Hunter said.
MAUI will support modern app patterns including Model-View-ViewModel (MVVM) and XAML Model-View-Update (MVU).
Hunter said that, as MAUI evolves Xamarin.Forms, .NET mobile developers will be able to hit the ground running to create new projects in .NET MAUI.
The differences between MAUI and Xamarin.Forms are illustrated here:
With the new scheme, Xamarin and Xamarin.Forms are in for some major changes. Xamarin.Forms will ship in a new major version later this year, followed by minor and service releases every 6 weeks through .NET 6 GA in November 2021.
Hunter explained the plans:
As part of our .NET unification, Xamarin.iOS and Xamarin.Android will become part of .NET 6 as .NET for iOS and .NET for Android. Because these bindings are projections of the SDKs shipped from Apple and Google, nothing changes there, however build tooling, target framework monikers, and runtime framework monikers will be updated to match all other .NET 6 workloads. Our commitment to keeping .NET developers up-to-date with the latest mobile SDKs is foundational to .NET MAUI and remains firm. When .NET 6 ships, we expect to ship a final release of Xamarin SDKs in their current form that will be serviced for a year. All modern work will at that time shift to .NET 6.
Planned development of MAUI can be seen its roadmap.