Skip to main content

Napacitor CLI - nap build

Build the MAUI host project. This is a thin wrapper around dotnet build with the target framework and configuration resolved for you.

npx nap build [maui] [--target <t>] [-c <cfg>]

Options:

  • --target <windows|android|ios|maccatalyst>: target platform. Defaults to windows on Windows, android elsewhere.
  • -c <Debug|Release>: build configuration (default: Debug).

Behavior:

Runs:

dotnet build maui/App.csproj -f <TFM> -c <Debug|Release>

The -f framework is resolved from the host project's TargetFrameworks and the requested --target.

Example:

# Debug build for the current platform
npx nap build

# Release build for Android (produces an AAB/APK)
npx nap build --target android -c Release

Use nap run to build, deploy, and start the app on a device. On Windows, nap run does not build — run nap build first.