npx skills add ...
npx skills add microsoft/winappcli --skill winapp-frameworks
Framework-specific Windows development guidance for Electron, .NET (WPF, WinForms), C++, Rust, Flutter, and Tauri. Use when packaging or adding Windows features to an Electron app, .NET desktop app, Flutter app, Tauri app, Rust app, or C++ app.
npx skills add microsoft/winappcli --skill winapp-frameworks
Use this skill when:
Each framework has a detailed guide — refer to the links below rather than trying to guess commands.
| Framework | Install method | Guide |
|---|---|---|
| Electron | npm install --save-dev @microsoft/winappcli | Electron setup guide |
| .NET (WPF, WinForms, Console) | winget install Microsoft.winappcli | .NET guide |
| .NET MAUI | winget install Microsoft.winappcli | MAUI guide + winapp-maui skill |
| C++ (CMake, MSBuild) | winget install Microsoft.winappcli | C++ guide |
| Rust | winget install Microsoft.winappcli | Rust guide |
| Flutter | winget install Microsoft.winappcli | Flutter guide |
| Tauri | winget install Microsoft.winappcli | Tauri guide |
Use the npm package (@microsoft/winappcli), not the standalone CLI. The npm package includes:
node_modulesnpx winapp node.winapp/bindings/) for direct JavaScript access to Windows App SDK APIsQuick start:
Windows integration guidance:
winapp.jsBindings.additionalWinmds in package.json.--template cpp for C++ (node-gyp), or --template cs for C#.Additional Electron guides:
.NET projects have direct access to Windows APIs. Key differences:
Microsoft.Windows.SDK.BuildTools or Microsoft.WindowsAppSDK don't need winapp.yaml — winapp auto-detects SDK versions from the .csprojPackage.appxmanifest, not winapp.yamlwinapp init automatically adds the Microsoft.Windows.SDK.BuildTools.WinApp NuGet package, enabling dotnet run with automatic identity registrationdotnet run go to the launched application, exactly as they would without the package; configure the launcher itself with the WinAppRun* MSBuild propertiesdotnet run -p:WinAppRunDetach=true --app-arg (WinApp detaches, the app receives --app-arg)-- when the app's flag is also a dotnet run option (--configuration, --framework, --project, -c, -f, -r, ...), e.g. dotnet run -- --configuration Release; otherwise the SDK claims it and the app never sees itIf you already have a Package.appxmanifest (e.g., WinUI 3 apps or projects with an existing packaging setup), you likely don't need winapp init — your project is already configured for packaged builds. Just make sure:
.csproj references the Microsoft.WindowsAppSDK NuGet package (WinUI 3 apps already have this)<WindowsPackageType>MSIX</WindowsPackageType> or equivalent)Quick start:
Replace <tfm> with your target framework (e.g., net10.0-windows10.0.26100.0), and adjust x64 to match your target architecture.
MAUI has one important quirk: its checked-in Platforms/Windows/Package.appxmanifest is full of $placeholder$ tokens that winapp package does not resolve. MAUI's resizetizer fills them at build/publish time into a generated manifest:
obj\<Config>\<TFM>\<RID>\resizetizer\m\Package.appxmanifestbin\<Config>\<TFM>\<RID>\AppxManifest.xmlPublish the Windows head first, then point winapp package --manifest at the generated manifest — never the source one. See the dedicated winapp-maui skill for the full workflow, CI examples, and troubleshooting.
C++ projects use winapp primarily for SDK projections (CppWinRT headers) and packaging:
winapp init --setup-sdks stable downloads Windows SDK + App SDK and generates CppWinRT headers.winapp/generated/include.cppwinrt.rsp for build system integration.winapp/packages to include/lib paths in your build systemwindows crate for Windows API bindingstarget/release/myapp.exeflutter build windows)build\windows\x64\runner\Release\.msi installers| Framework | Recommended command | Notes |
|---|---|---|
| .NET | winapp run .\bin\x64\Debug\<tfm>\win-x64\ | Build with dotnet build -c Debug -p:Platform=x64 first; GUI apps launch via AUMID, console apps automatically via an execution alias |
| C++ | winapp run .\build\Debug | Console apps are detected and launched via an execution alias automatically |
| Rust | winapp run .\target\debug | Console apps are detected and launched via an execution alias automatically |
| Flutter | winapp run .\build\windows\x64\runner\Debug | GUI app — plain winapp run works |
| Tauri | winapp run .\dist | Stage exe to dist/ first (avoids copying entire target/ tree); GUI app |
| Electron | npx winapp node add-electron-debug-identity | Uses Electron-specific identity registration; winapp run is not recommended for Electron |
Key rules:
winapp run <build-output> — launches via AUMID activationwinapp run <build-output> — winapp detects a console app from the built binary's PE subsystem and launches it via an execution alias, so stdin/stdout reach your terminal. It stages the required uap5:ExecutionAlias into the AppX layout itself, so no manifest edit is needed. Pass --without-alias to force AUMID activation instead (the app then prints nothing); --with-alias only forces an alias for a windowed appnpx winapp node add-electron-debug-identity because electron.exe is in node_modules/, not your build outputwinapp create-debug-identity <exe> so your IDE can F5-launch the exe with identity from the first instructionFor full debugging scenarios and IDE setup, see the Debugging Guide.
winapp-setup — initial project setup with winapp initwinapp-manifest — creating and customizing Package.appxmanifestwinapp-signing — certificate generation and managementwinapp-package — creating MSIX installers from build outputwinapp-identity — enabling package identity for Windows APIs during developmentwinapp-maui — packaging/signing .NET MAUI Windows apps and resolving the resizetizer manifestwinapp-troubleshoot for a command selection flowchartRun winapp <command> --help for current command options, or winapp --cli-schema for the complete machine-readable command schema.