Build a Mac Catalyst app with .NET CLI
In this tutorial, you'll learn how to create and run a .NET Multi-platform App UI (.NET MAUI) app on Mac Catalyst using .NET Command Line Interface (CLI) on macOS:
.NET Multi-platform App UI (.NET MAUI) is currently in preview. This content relates to a pre-release product that may be substantially modified before it's released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
To create .NET MAUI apps, you'll need to download and run the installer for the latest .NET 6 runtime. You'll also need to download and install the latest version of Xcode 13, which is also available from the App Store app on your Mac.
On your Mac, open Terminal and check that you have the latest .NET 6 runtime installed:
In Terminal, install the latest public build of .NET MAUI:
sudo dotnet workload install maui --source https://api.nuget.org/v3/index.json
This command will install the latest released version of .NET MAUI, including the required platform SDKs.
In Terminal, create a new .NET MAUI app using .NET CLI:
dotnet new maui -n "MyMauiApp"
In Terminal, change directory to MyMauiApp, and build and run the app:
cd MyMauiApp dotnet build -t:Run -f net6.0-maccatalyst
dotnet buildcommand will restore the project dependencies, build the app, and launch it.
In the running app, press the Click me button several times and observe that the count of the number of button clicks is incremented.
Submit and view feedback for