Skip to main content

Napacitor CLI - nap clean

Clean the MAUI host project's build artifacts. This is a thin wrapper around dotnet clean with the target framework and configuration resolved for you.

npx nap clean [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 clean maui/App.csproj -f <TFM> -c <Debug|Release>

Notes:

  • Stop the app before cleaning: a running app locks the output DLLs (especially on Windows), and cleaning will fail.
  • If a failed build left the host in a broken incremental state (e.g. the app crashes on startup with 0xC000027B), nap clean may not be enough — delete the host bin/ and obj/ directories manually. See Troubleshooting.