BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News .NET MAUI Framework Released Together with Visual Studio 2022

.NET MAUI Framework Released Together with Visual Studio 2022

Bookmarks

Microsoft announced last August that its multi-platform UI framework, MAUI, had been officially released and out of preview, with the launch of Visual Studio 2022 for Windows. The release marks the official launch of the new framework for .NET programmers targeting Android and iOS devices, a direct successor to Microsoft’s Xamarin Forms framework.

MAUI is an acronym that stands for Multiplatform Application UI. According to Microsoft, it’s an evolution of Xamarin and Xamarin Forms frameworks, unifying separate target libraries and projects into a single project for multiple devices, in the light of the .NET 6 unification effort called The Journey to One .NET. Currently, MAUI supports writing applications that run on Android 5+, iOS 10+, macOS 10.15+, Windows 10 version 1809+, or Windows 11.

MAUI application project is a single .NET project. It has platform-specific asset subfolders while the app UI and code are shared and transformed automatically. Platform-specific code, such as application initializers and manifests, also live in those folders. Developers can treat special edge cases for a platform by extending and leveraging them.

The first MAUI preview was announced in May 2020, and it has taken the framework more than two years to reach the quality bar for a GA release. Originally slated for joint release with .NET 6 in November 2021, it finally reached 14 previews and three release candidate versions before the release. As MAUI is open-sourced by Microsoft, the source code and issues list are available on GitHub.

Visual Studio 2022 for Windows version 17.3 includes MAUI workload as an optional installation called .NET Multi-platform App UI development. Right now, it only supports .NET 6 for MAUI development, and Microsoft expressly states that installing .NET 7 preview versions is not supported for building MAUI applications. In addition, Microsoft has announced Visual Studio 2022 for Mac Preview, which brings MAUI support for developers using Mac machines.

Visual Studio 2022 brings several improvements for developing MAUI applications:

  • XAML Live Preview allows developers to dock app UI directly in Visual Studio as a window. The UI elements are updated live when the underlying XAML markup is edited, allowing the developers to visualize the changes side to side with the code.
  • XAML Hot Reload allows for similar side-to-side live changes, but the whole app UI is reloaded instead. It only supports MAUI applications launched in debug mode from Visual Studio. It is similar to the existing hot reload experience for WPF and UWP applications.
  • IntelliCode has specific features for suggesting XAML markup and C# code completion based on the patterns it has detected from the application’s existing code.

While .NET developers seem to like the idea of MAUI as a further simplification and evolution of Xamarin, some are worried about the ever-increasing list of bugs that do not seem to be resolved fast enough. At the moment of writing this text, there were 629 bugs acknowledged by the MAUI team as open. Many voices are criticizing what is, in their opinion, a premature launch of MAUI while those bugs are still being ironed out.

While Microsoft recommends using MAUI for new developments, Xamarin and Xamarin Forms are still officially supported until May 1, 2024. Developers can migrate their existing Xamarin Forms (only iOS and Android projects right now) using the guidance provided by Microsoft and tools inside Visual Studio 2022.

About the Author

Rate this Article

Adoption
Style

BT