Publish a .NET MAUI app for macOS

When distributing your .NET Multi-platform App UI (.NET MAUI) app for macOS, you generate an .app or a .pkg file. An .app file is a self-contained app that can be run without installation, whereas a .pkg is an app packaged in an installer.

Publish an unsigned app

At this time, publishing is only supported through the .NET command line interface.

To publish your app, open a terminal and navigate to the folder for your .NET MAUI app project. Run the dotnet build command, providing the following parameters:

Parameter Value
-f or --framework The target framework, which is net6.0-maccatalyst.
-c or --configuration The build configuration, which is Release.
/p:CreatePackage An optional parameter that controls whether to create an .app or a .pkg. Use true for a .pkg.


Attempting to publish a .NET MAUI solution will result in the dotnet publish command attempting to publish each project in the solution individually, which can cause issues when you've added other project types to your solution. Therefore, the dotnet publish command should be scoped to your .NET MAUI app project.

For example, use the following command to create an .app:

dotnet build -f:net6.0-maccatalyst -c:Release

Use the following command to create a .pkg:

dotnet build -f:net6.0-maccatalyst -c:Release /p:CreatePackage=true

Publishing builds the app, and then copies the .app or .pkg to the bin/Release/net6.0-maccatalyst/maccatalyst-x64 folder.

For more information about the dotnet publish command, see dotnet publish.

Run the unsigned app

By default, .app and .pkg files that are downloaded from the internet can't be run by double-clicking on them. For more information, see Open a Mac app from an unidentified developer.

To ensure that a .pkg installs the app to your Applications folder, copy the .pkg to outside of your build artifacts folder and delete the bin and obj folders before double-clicking on the .pkg.

See also