.NET Multi-Platform App UI, also known as .NET MAUI, is an open-source cross-platform framework for creating native apps. The main idea here is to enable implementation of UI Layout and all the app logic in a single code-base. 

Key Benefits: 

  • Write cross-platform apps in XAML and C#, from a single shared code-base in Visual Studio.
  • Share UI layout and design across platforms.
  • Share code, tests, and business logic across platforms.
.NET MAUI


How it works

.NET MAUI provides singular APIs for developers, which access native platform APIs. It can also be imagined as a C# wrapper for multiple native platform APIs, providing a write-once, run-anywhere experience.  

Main Idea:

  1. Write code that interacts with .NET MAUI API.
  2. App code can directly access .NET wrapped versions of the native APIs.
  3. .NET MAUI can directly consume the native platform APIs.
.NET MAUI

Android:

.NET MAUI compile from C# into intermediate language, which is then Just-in-time (JIT) compiled to native assembly during app launch. 

iOS:

iOS builds compile ahead-of-time (AOT) from C# into native ARM assembly code. 

Windows:

.NET MAUI uses WinUI3 library internally to create apps that target Windows. 

macOS:

Built using Mac Catalyst.

Supported Platforms

.NET MAUI platform requirements:

  • Android 5.0 (API 21) or higher.
  • iOS 10 or higher.
  • macOS 10.13 or higher, using Mac Catalyst.
  • Windows 11 and Windows 10 version 1809 or higher, using WinUI3

.NET MAUI Blazor apps have the following additional platform requirements:

  • Android 7.0 (API 24) or higher is required
  • iOS 14 or higher is required.
  • macOS 11 or higher, using Mac Catalyst.

Environment Setup

.NET MAUI is the evolution of Xamarin Forms and is embedded directly into .NET 6 framework. As such, the development environment setup has gotten simpler. 

At the time of writing this, one must install Visual Studio 2022 Preview to access .NET MAUI. MAUI is targeted for release in June 2022.

Setup Steps:

  1. Download Visual Studio 2022.
  2. Modify the installation to include .NET MAUI development workload.  
MAUI install