Overview
In this tutorial you will create your first .NET Multi‑platform App UI (MAUI) application, run it on Windows, Android, and iOS, and explore the project structure.
Prerequisites
- Visual Studio 2022 (17.6+) with .NET MAUI workload installed.
- .NET 8 SDK.
- Android SDK (API 33) and iOS tooling (Xcode) if you target mobile platforms.
Step 1 – Create a New MAUI Project
Open Visual Studio and select Create a new project. Choose .NET MAUI App (Preview) and click Next.
dotnet new maui -n FirstMauiApp
Alternatively, use the CLI:
dotnet new maui -n FirstMauiApp
cd FirstMauiApp
dotnet build
Step 2 – Explore the Project Structure
The generated solution contains the following key folders:
Platforms
– Platform‑specific code (Android, iOS, Windows, macOS).Resources
– Images, fonts, and app icons.MainPage.xaml
– The default UI page.App.xaml.cs
– Application lifecycle events.
Step 3 – Run the App
Press F5 or click Run in Visual Studio. Choose a target device (Windows, Android emulator, or iOS simulator).
The default app shows a simple label:
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
x:Class="FirstMauiApp.MainPage">
<VerticalStackLayout Spacing="25" Padding="30">
<Label Text="Welcome to .NET MAUI!"
FontSize="24"
HorizontalOptions="Center" />
</VerticalStackLayout>
</ContentPage>
Next Steps
- Learn about layout containers and controls.
- Implement navigation with
Shell
. - Explore platform‑specific APIs.
- Publish your app to the App Store or Google Play.