winui-code-review
Code quality review for WinUI 3 apps — MVVM compliance, x:Bind correctness, accessibility, theming, security, and performance. Use before committing to catch…
MSIX packaging, code signing, and distribution for WinUI 3 apps — build for release, certificate generation (winapp cert generate), certificate trust, code signing (winapp sign), self-contained deployment, CI/CD with GitHub Actions, and Microsoft Store submission. Use when
$ npx -y skills add microsoft/win-dev-skills --skill winui-packaging --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/winui-packagingContext preview
The summary Claude sees to decide when to auto-load this skill.
MSIX packaging, code signing, and distribution for WinUI 3 apps — build for release, certificate generation (winapp cert generate), certificate trust, code signing (winapp sign), self-contained deployment, CI/CD with GitHub Actions, and Microsoft Store submission. Use when
name: winui-packaging description: "MSIX packaging, code signing, and distribution for WinUI 3 apps — build for release, certificate generation (winapp cert generate), certificate trust, code signing (winapp sign), self-contained deployment, CI/CD with GitHub Actions, and Microsoft Store submission. Use when preparing for release, creating MSIX installers, managing certificates, setting up CI/CD packaging, or publishing to the Microsoft Store."
| Task | Command | |------|---------| | Build for release | `.\BuildAndRun.ps1 . -c Release --arch x64 --no-launch` | | Package + sign | `winapp package <dir> --cert devcert.pfx` | | Generate + sign + package | `winapp package <dir> --generate-cert --install-cert` | | Generate dev certificate | `winapp cert generate` | | Trust certificate (admin) | `winapp cert install ./devcert.pfx` | | Sign existing file | `winapp sign ./app.msix ./devcert.pfx` | | Self-contained deployment | `winapp package <dir> --cert devcert.pfx --self-contained` |
Build the project in Release configuration without launching it. Use the `BuildAndRun.ps1` wrapper from the `winui-dev-workflow` skill — plain `dotnet build` does **not** load the bundled `Microsoft.WindowsAppSDK.Analyzers`, so release builds would ship without the analyzer gate that development builds get:
.\BuildAndRun.ps1 . -c Release --arch x64 --no-launch
`--no-launch` builds and registers a development package without starting the app. Run `winapp unregister` before installing the signed `.msix` in Step 5, so the development registration does not conflict with the packaged identity.
winapp cert generate --manifest .
Creates `devcert.pfx` (default password: `password`). The `--manifest` flag auto-matches the `Publisher` field in `Package.appxmanifest`.
winapp cert install ./devcert.pfx
Adds cert to machine Trusted Root store. Persists across reboots.
winapp package <build-output-dir> --cert ./devcert.pfx
This locates `appxmanifest.xml`, stages the layout, generates `resources.pri`, creates `.msix`, and signs it.
# Local install Add-AppxPackage ./MyApp.msix # Or double-click the .msix file
winapp package <dir> --cert prod.pfx --timestamp http://timestamp.digicert.com
name: Build and Package
on: [push]
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: microsoft/setup-WinAppCli@v0.1
- name: Build
run: dotnet build -c Release -p:Platform=x64
- name: Package
run: |
winapp cert generate --if-exists skip --quiet
winapp package ./bin/x64/Release/ --cert ./devcert.pfx --quiet
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: msix-package
path: "*.msix"**CI/CD tips:**
1. **Partner Center account** — register at [partner.microsoft.com](https://partner.microsoft.com) 2. **Age ratings** — complete the questionnaire in Partner Center 3. **Screenshots** — capture at 1366x768 minimum resolution 4. **Privacy policy** — required for apps that access internet or user data 5. **Submit:** upload the signed `.msix` / `.msixbundle` produced by `winapp package` via [Microsoft Partner Center](https://partner.microsoft.com/dashboard) — Apps and games → your app → Packages. Microsoft Store submission is browser-based; there is no first-party CLI submit command yet.
| Error | Solution | |-------|----------| | "Publisher mismatch" | Run `winapp cert generate --manifest` to re-generate | | "Certificate not trusted" | Run `winapp cert install ./devcert.pfx` as admin | | "Access denied" | `cert install` needs admin elevation | | "Certificate file already exists" | Use `--if-exists overwrite` or `--if-exists skip` | | "appxmanifest.xml not found" | Run `winapp init` or pass `--manifest <path>` | | "Package installation failed" | Trust cert first; remove stale: `Get-AppxPackage <name> \| Remove-AppxPackage` | | Signature invalid after time | Re-sign with `--timestamp` |
| File | Read when... | |------|-------------| | `references/sourcegen-patterns.md` | Setting up AOT/trimming, JSON source generators, NativeAOT readiness, CsWin32 |
An Agent Plugins 1.0 package with GitHub Copilot, Claude Code, and OpenAI Codex compatibility for building native Windows apps with WinUI 3 and the Windows App SDK. It covers the end-to-end inner loop: scaffold → design → build → run → test → package → ship.
Repo: microsoft/win-dev-skills
Code quality review for WinUI 3 apps — MVVM compliance, x:Bind correctness, accessibility, theming, security, and performance. Use before committing to catch…
Use when designing, reviewing, or fixing WinUI 3: sample and control discovery with winapp find-ui, layout planning, control choice, Fluent Design alignment,…
Build and run workflow for WinUI 3 apps with WinApp CLI 0.6+ — project creation with winapp new, project-mode winapp run, BuildAndRun.ps1 analyzer integration,…
Analyze the current or a recent agent session (GitHub Copilot CLI or Claude Code) and generate a diagnostic report. Use only when the user explicitly asks for…
Install and verify the prerequisites the win-dev-skills WinUI 3 toolchain depends on — .NET SDK 8.0.100+, WinApp CLI 0.6+, and Developer Mode. Use only when…
Automated UI testing for Windows desktop apps — generate a batch test script with the `winapp ui` UI Automation harness, run all tests in one pass, read…