Install .NET MAUI

This guide will walk you through the steps to install .NET MAUI (Multi-platform App UI), enabling you to build native cross-platform applications for Windows, macOS, Android, and iOS using a single codebase.

Prerequisites

Before you begin, ensure you have the following installed:

Tip

For the best experience, we recommend using the latest stable version of Visual Studio.

Installation Steps

1. Visual Studio Installer

If you already have Visual Studio 2022 installed, launch the Visual Studio Installer. If not, download and run it from the Visual Studio website.

In the Visual Studio Installer, select the ".NET Multi-platform App UI development" workload. This will automatically select necessary components, including:

Click Modify or Install to begin the installation.

2. Command-Line Installation (Optional)

You can also install .NET MAUI via the command line using the .NET SDK's NuGet package manager.

Open your terminal or command prompt and run the following command:

dotnet workload install maui

This command will download and install the necessary workloads for .NET MAUI development.

Note

The command-line installation might require administrative privileges on some systems.

3. SDK Command-Line Tools

If you plan to develop without an IDE, ensure you have the .NET SDK installed. You can verify your installation by running:

dotnet --list-sdks

And check for the MAUI workload:

dotnet workload list

Verifying Installation

Once the installation is complete, you can verify it by creating a new .NET MAUI project:

  1. Open Visual Studio.
  2. Click "Create a new project".
  3. Search for ".NET MAUI App" and select the template.
  4. Follow the prompts to name your project and choose a location.
  5. Click "Create".

If the project creates successfully and you can build and run it on a simulator or device, your installation is complete.

macOS Specifics

On macOS, you'll also need Xcode installed for iOS and macOS development. Ensure you have the latest version of Xcode from the App Store.

You might need to run the following command in your terminal to install the necessary components for macOS development:

dotnet workload install maui-ios
dotnet workload install maui-maccatalyst

Troubleshooting

If you encounter issues during installation:

You are now ready to start building stunning cross-platform applications with .NET MAUI!