.NET MAUI Tutorial - Build your first multi-platform app in C#
Download and install
-
Download and install the .NET SDK. After the download completes, launch the download to begin the install.
Download .NET 9 SDK x64 (Intel)
Download .NET 9 SDK Arm64 (Apple Silicon)If you're on a Mac with an Apple M1 or M2 chip, you need to install the Arm64 version of the SDK.
-
Download and install VS Code:
-
Open VS Code and select the Extensions button in VS Code's Activity Bar to the left. Type MAUI in the search bar, select .NET MAUI, and then select the Install button on the .NET MAUI extension page.
This extension comes with the C# Dev Kit and the C# extensions, which are required for the .NET MAUI extension to run.
-
Open a new terminal and install the .NET MAUI workload by running the following command:
Terminalsudo dotnet workload install maui
If the installation succeeded, you should see an output similar to the following:
TerminalSuccessfully installed workload maui
Check everything installed correctly
Once you've set up your environment, open a new VS Code terminal. In the toolbar, select Terminal, then New Terminal.
In your terminal, run the following command to check your installation.
dotnet workload list
If the installation succeeded, you should see an output similar to the following:
Installed Workload Id Manifest Version Installation Source
--------------------------------------------------------------------
maui 8.0.82/8.0.100 SDK 8.0.400
Use `dotnet workload search` to find additional workloads to install.
Got an error?
If you receive a 'dotnet' is not recognized as an internal or external command error, make sure you opened a new VS Code terminal. If restarting VS Code or restarting your machine doesn't resolve the issue, use the I ran into an issue button at the bottom of the page to get help fixing the problem.
Install Xcode
To build .NET MAUI apps, you'll also need:
-
An Apple ID
If you don't already have an Apple ID, you can create a new one at https://appleid.apple.com. An Apple ID is required for installing and signing into Xcode.
After installing Xcode, you must open Xcode and agree to the license agreements and install optional components, if prompted.
-
When asked what platforms you'd like to develop for, select platforms macOS and iOS and then select Download & Install.
-
Open a new terminal and install the Xcode command line developer tools by running the following command:
Terminalxcode-select --install
When prompted to install Xcode command line developer tools, select Install. Lastly, agree to the license agreement.
To find the latest version of Xcode that is compatible with .NET MAUI, check this release version reference. Go to the Apple Tools column to find the latest compatible Xcode version.
If everything looks good, select the Continue button below to go to the next step.