Labsco
microsoft logo

winapp-setup

โœ“ Officialโ˜… 1,128

by microsoft ยท part of microsoft/winappcli

Set up a Windows app project for MSIX packaging, Windows SDK access, or Windows API usage. Use when adding Windows support to an Electron, .NET, C++, Rust, Flutter, or Tauri project, or restoring SDK packages after cloning.

๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅโœ“ VerifiedFreeQuick setup
๐Ÿงฐ Not standalone. This skill ships with microsoft/winappcli and only works together with that tool โ€” install the tool first, then add this skill.

This is the playbook your agent receives when the skill activates โ€” you don't need to read it to use the skill, but it's here to audit before installing.

When to use

Use this skill when:

  • Scaffolding a brand-new WinUI 3 app from an official Windows App SDK template (winapp new)
  • Adding Windows platform support to an existing project (Electron, .NET, C++, Rust, Flutter, Tauri, etc.)
  • Cloning a repo that already uses winapp and need to restore SDK packages
  • Updating SDK versions to get the latest Windows SDK or Windows App SDK

Key concepts

Package.appxmanifest is the most important file winapp creates โ€” it declares your app's identity, capabilities, and visual assets. Most winapp commands require it (package, run, cert generate --manifest).

winapp.yaml is only needed for SDK version management via restore/update. Projects that already reference Windows SDK packages (e.g., via NuGet in a .csproj) can use winapp commands without it.

.winapp/ is the local folder where SDK packages and generated projections (e.g., CppWinRT headers) are stored. This folder is .gitignored โ€” team members recreate it via winapp restore.

  1. Initialize โ€” winapp init . --use-defaults in your existing project
  2. Configure โ€” edit Package.appxmanifest to add capabilities your app needs (e.g., runFullTrust, internetClient)
  3. Build โ€” build your app as usual (dotnet build, cmake, npm run build, etc.)
  4. Run with identity โ€” winapp run ./bin/Debug to register identity and launch for debugging
  5. Package โ€” winapp package ./bin/Release --cert ./devcert.pfx to create MSIX

Tips

  • Use --use-defaults (alias: --no-prompt) in CI/CD pipelines and scripts to avoid interactive prompts. Non-interactive environments (piped stdin, CI runners) are auto-detected and will use defaults automatically with a warning.
  • If you only need Package.appxmanifest without SDK setup, use winapp manifest generate instead of init
  • winapp init is idempotent for the config file โ€” re-running it won't overwrite an existing winapp.yaml unless you use --config-only
  • For Electron projects, prefer npm install --save-dev @microsoft/winappcli and use npx winapp init instead of the standalone CLI
  • After setup, see winapp-manifest to customize your Package.appxmanifest
  • Ready to package? See winapp-package to create an MSIX installer
  • Need a certificate? See winapp-signing for certificate generation
  • Not sure which command to use? See winapp-troubleshoot for a command selection flowchart

CLI reference

Run winapp <command> --help for current command options, or winapp --cli-schema for the complete machine-readable command schema.