To create .NET Multi-platform App UI (.NET MAUI) apps, you need the latest preview versions of Visual Studio 2022 and .NET 6.
The documentation for .NET Multi-app Platform UI (.NET MAUI) is under construction.
To create .NET MAUI apps, you'll need Visual Studio 2022 Preview 4 or later. Either install Visual Studio, or modify your installation, and install the following workloads:
Mobile development with .NET
Universal Windows Platform development
ASP.NET and web development (required for .NET MAUI Blazor apps)
In the Installation details > Mobile development with .NET section of the installation window, check the .NET MAUI (Preview) optional workload:
.NET MAUI requires the Android 12 (API 31) SDK for development. Install the following items:
While Visual Studio installs a version of Microsoft OpenJDK, you need to install Microsoft OpenJDK 11, available from the OpenJDK page. When installing OpenJDK 11, use the default installation configuration settings. After installing OpenJDK 11, Visual Studio should automatically consume it. However, if it doesn't, set the path to the OpenJDK install in the Tools > Options > Xamarin > Android Settings > Java Development Kit Location field.
Android 12 (API 31) SDK
The Android 12 SDK must be installed so that Visual Studio can create a .NET MAUI app. This can be accomplished through Visual Studio:
Open Visual Studio.
If the Open Recent/Get Started window opens, choose Continue without code.
In the main Visual Studio window, use the menu to choose Tools > Options.... The options window is displayed.
In the search bar, type
android. Select the Xamarin > Android Settings category.
The Android SDK Location field should point to a default of C:\Program Files (x86)\Android\android-sdk. It probably has a red
Xindicating it's not configured correctly. This is normal.
Select the OK button to close the window.
Visual Studio will now attempt to load the Android SDKs. This may involve accepting the Android SDK License:
If you lack a previous Android install, Visual Studio will download the Android tooling required for you to proceed.
Visual Studio should now be able to load the Android SDK Manager. The next step is to install the Android 12 SDK:
In the main Visual Studio window, choose the Tools > Android > Android SDK Manager... menu item.
In the Android SDK Manager, check the Android 12.0 API Level 31 item and click the Apply Changes button.
Visual Studio will then install the Android 12 SDK.
Windows (WinUI 3)
To create apps that target Windows UI Library (WinUI) 3, install the following Visual Studio extension:
You must uncomment the Windows
TargetFrameworks from your .csproj file in order to enable windows development.
To learn how to create and run your first .NET MAUI app, continue to build your first app.