microsoft / microsoft/win-dev-skills
winui-dev-workflow + analyzer: set <RuntimeIdentifiers> for multi-arch packaging by default
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 442
- Forks
- 33
- Avg merge
- 2h 59m
- Merged PRs (30d)
- 11
Description
97: #97
Problem
From Joe's blog post:
When I selected to package for x64 and Arm64 I got an error stemming from the runtime identifiers not being set, a quick fix.
The winui-mvvm template scaffolds a project without a <RuntimeIdentifiers> property. winapp package for both x64 and Arm64 then fails with an error that's clear once you know it, opaque if you don't. Joe figured it out manually; the agent didn't anticipate it.
Proposed fix
Two-part:
-
Scaffold fix (
winui-dev-workflow) — afterdotnet new winui-mvvm, ensure the.csprojcontains:<PropertyGroup> <RuntimeIdentifiers>win-x64;win-arm64</RuntimeIdentifiers> </PropertyGroup>via a small post-scaffold merge step in the skill (or, ideally, a PR upstream to the WinUI template itself so this disappears).
-
Analyzer rule (
Microsoft.WindowsAppSDK.Analyzers) — new rule (proposed IDWAPK00XX, Warning severity, withhelpLinkUri):Package.appxmanifest declares Arm64 (or any architecture not present in
<RuntimeIdentifiers>) —winapp packagewill fail. Addwin-arm64to<RuntimeIdentifiers>in the.csproj.This catches the existing-project case the scaffold fix doesn't cover.
Related
May be subsumed by — or coordinated with — a unified "greenfield polish phase" step (see cross-cutting themes on the 97 issue).
Acceptance criteria
- New scaffold passes
winapp packagefor bothx64andarm64with zero edits. - Analyzer rule fires on a mismatched existing project; analyzer test added.
- Rule documented in
src/tools/winui-analyzer/README.mdwith its rule-table entry.
Acknowledgments
Identified by Joe Finney in Building Fluent Icon Finder with the WinUI Copilot skill.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by inspecting the winui-dev-workflow post-scaffold step and the analyzer documentation at src/tools/winui-analyzer/README.md. Identify the analyzer's test location and existing rule-table format, then verify that a new scaffold packages for x64 and arm64, the mismatch rule fires, its test passes, and the rule is documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- build-system, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100