Microsoft has made available the release candidate of .NET MAUI (Multi-platform App UI), complete with a go-live license for developers who cannot wait to ship applications using the technology.
MAUI is based on Xamarin forms and was originally intended to ship with .NET 6.0, but was not ready in time. It represents the company’s solution for .NET developers targeting multiple platforms, with those supported being Android, iOS, Mac and Windows, with the Windows variant being WinUI 3, for a look and feel in line with Windows 10 and 11. Apple Watch is not currently supported.
Microsoft’s .NET technology has been cross-platform since the introduction of .NET Core in 2016, but mainly for server-side and web development. This project is the closest thing to an official GUI framework for cross-platform .NET.
Principal Program Manager David Ortineau said that MAUI improves on Xamarin Forms in several ways. There is multi-window support, and new controls such as Border, GraphicsView and MenuBar, and BlazorWebView which enables a Blazor web app to be hosted within a .NET MAUI application. Blazor includes .NET components that render a web user interface. A table of differences between Xamarin Forms and MAUI can be found here.
Although Mac desktop applications are a supported target, Visual Studio 2022 for the Mac does not yet support MAUI and developers are directed towards the command line and Visual Studio Code for trying out the new release candidate, though Visual Studio support is planned.
In the early days of Xamarin, before it was acquired by Microsoft in 2016, the idea of coding for iOS and Android with C# was new and compelling. Today developers have more options, including browser-based approaches using Blazor compiled to web assembly, or the Uno platform which targets a broader range of platforms using .NET. Looking outside the .NET world, the power of the web platform continues to improve and can be deployed to the desktop, and Google has made strong progress with Flutter, a cross-platform framework using the Dart language.
A distinctive feature of both MAUI and Xamarin Forms though is that they use native controls rather than drawing their own. This is beneficial both for a native look and feel, and for working well with platform accessibility tools.
Developers responding to Ortineau’s post noted the lack of official Linux support, without which the cross-platform story is incomplete, though there is an unofficial port. The matter is discussed here and Microsoft seems open to considering it for a future release. “Let me know what your use cases are for targeting Linux as a platform so we can plan our roadmap for .NET MAUI,” said Ortineau.
A snag with the MAUI rollout is that it is sufficiently different from Xamarin Forms that third-party controls and libraries will have to be ported. “Yes, there will be a period of time where the ecosystem adopts the .NET MAUI release and update their offerings. This RC is the tip of the spear that some have been waiting for to begin their updates,” Ortineau said.