mcpbeat Sign in

Winui Packaging Agent 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 preparing for release, creating MSIX installers, managing certificates, setting up CI/CD packaging, or publishing to the Microsoft Store.

2k tokens
context cost
the whole folder, loaded on every use
2
files
instructions only
0
copies elsewhere
how many repositories repackaged it
127 d ago
last touched
this folder, not the whole repository

Install

one command, takes just this skill from the repository
npx skills add https://github.com/microsoft/win-dev-skills --skill winui-packaging

The instruction itself

12 sections, as written by the author

Quick Reference

| Task | Command |

|------|---------|

| Build for release | .\BuildAndRun.ps1 /p:Configuration=Release |

| 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 |

End-to-End Workflow

Step 1: Build for Release

Use the BuildAndRun.ps1 script from the winui-dev-workflow skill to build your app in Release configuration without launching it:

.\BuildAndRun.ps1 /p:Configuration=Release -SkipRun
Step 2: Generate Certificate (one-time)
winapp cert generate --manifest .

Creates devcert.pfx (default password: password). The --manifest flag auto-matches the Publisher field in Package.appxmanifest.

Step 3: Trust Certificate (one-time, requires admin)
winapp cert install ./devcert.pfx

Adds cert to machine Trusted Root store. Persists across reboots.

Step 4: Package and Sign
winapp package <build-output-dir> --cert ./devcert.pfx

This locates appxmanifest.xml, stages the layout, generates resources.pri, creates .msix, and signs it.

Step 5: Install or Distribute
# Local install
Add-AppxPackage ./MyApp.msix

# Or double-click the .msix file

Key Rules

  • Publisher must match between certificate and manifest Identity.Publisher — use winapp cert generate --manifest to auto-match
  • Prefer winapp package --cert over separate winapp sign — one step instead of two
  • cert install requires admin — run terminal as Administrator
  • Default PFX password is password — override with --password
  • --timestamp is critical for production — without it, signatures expire with the cert:
  winapp package <dir> --cert prod.pfx --timestamp http://timestamp.digicert.com
  • --self-contained bundles Windows App SDK runtime — larger but no runtime dependency

CI/CD with GitHub Actions

name: Build and Package
on: [push]
jobs:
  build:
    runs-on: windows-latest
    steps:
      - uses: actions/checkout@v4
      - uses: microsoft/[email protected]

      - 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:

  • Use --quiet for clean output
  • Use --if-exists skip with cert generate to avoid failures on re-runs
  • Store production PFX as a repository secret

Store Submission

  • Partner Center account — register at partner.microsoft.com
  • Age ratings — complete the questionnaire in Partner Center
  • Screenshots — capture at 1366x768 minimum resolution
  • Privacy policy — required for apps that access internet or user data
  • Submit: upload the signed .msix / .msixbundle produced by winapp package via Microsoft Partner Center — Apps and games → your app → Packages. Microsoft Store submission is browser-based; there is no first-party CLI submit command yet.

Troubleshooting

| 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 |

References

| File | Read when... |

|------|-------------|

| references/sourcegen-patterns.md | Setting up AOT/trimming, JSON source generators, NativeAOT readiness, CsWin32 |

Other skills for the same job

different authors, same section of the catalogue
Lamindb
by christophacham
×3

This skill should be used when working with LaminDB, an open-source data framework for biology that makes data queryable, traceable, reproducible, and FAIR. Use when managing biological datasets (scRNA-seq, spatial, flow cytometry, etc.), tracking computational workflows, curating and validating data with biological ontologies, building data lakehouses, or ensuring data lineage and reproducibility in biological research. Covers data management, annotation, ontologies (genes, cell types, diseases, tissues), schema validation, integrations with workflow managers (Nextflow, Snakemake) and MLOps platforms (W&B, MLflow), and deployment strategies.

22k tokens
Latchbio Integration
by christophacham
×3

Latch platform for bioinformatics workflows. Build pipelines with Latch SDK, @workflow/@task decorators, deploy serverless workflows, LatchFile/LatchDir, Nextflow/Snakemake integration.

12k tokens
Modal
by christophacham
×3

Run Python code in the cloud with serverless containers, GPUs, and autoscaling. Use when deploying ML models, running batch processing jobs, scheduling compute-intensive tasks, or serving APIs that require GPU acceleration or dynamic scaling.

17k tokens
Pyhealth
by christophacham
×3

Comprehensive healthcare AI toolkit for developing, testing, and deploying machine learning models with clinical data. This skill should be used when working with electronic health records (EHR), clinical prediction tasks (mortality, readmission, drug recommendation), medical coding systems (ICD, NDC, ATC), physiological signals (EEG, ECG), healthcare datasets (MIMIC-III/IV, eICU, OMOP), or implementing deep learning models for healthcare applications (RETAIN, SafeDrug, Transformer, GNN).

22k tokens
Github Workflow Automation
by ComeOnOliver
×3

Advanced GitHub Actions workflow automation with AI swarm coordination, intelligent CI/CD pipelines, and comprehensive repository management

9k tokens
Lamindb
by ComeOnOliver
×3

This skill should be used when working with LaminDB, an open-source data framework for biology that makes data queryable, traceable, reproducible, and FAIR. Use when managing biological datasets (scRNA-seq, spatial, flow cytometry, etc.), tracking computational workflows, curating and validating data with biological ontologies, building data lakehouses, or ensuring data lineage and reproducibility in biological research. Covers data management, annotation, ontologies (genes, cell types, diseases, tissues), schema validation, integrations with workflow managers (Nextflow, Snakemake) and MLOps platforms (W&B, MLflow), and deployment strategies.

41k tokens
Ml Pipeline Workflow
by ComeOnOliver
×3

Build end-to-end MLOps pipelines from data preparation through model training, validation, and production deployment. Use when creating ML pipelines, implementing MLOps practices, or automating model training and deployment workflows.

5k tokens
Pyhealth
by ComeOnOliver
×3

Comprehensive healthcare AI toolkit for developing, testing, and deploying machine learning models with clinical data. This skill should be used when working with electronic health records (EHR), clinical prediction tasks (mortality, readmission, drug recommendation), medical coding systems (ICD, NDC, ATC), physiological signals (EEG, ECG), healthcare datasets (MIMIC-III/IV, eICU, OMOP), or implementing deep learning models for healthcare applications (RETAIN, SafeDrug, Transformer, GNN).

39k tokens

How to use it

Copy the folder

Take microsoft/winui-packaging from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.