| name | avalonia-to-winui-migration |
| description | Use when migrating Avalonia source projects, XAML, controls, resources, or code-behind to WinUI 3 or Uno with the local MigrateToWinUI CLI and rule catalog. |
Avalonia To WinUI Migration
Use this skill when a user asks to migrate, analyze, convert, stage, or validate an Avalonia app or library for WinUI 3 or Uno.
Workflow
- Locate the repo root and build the tool if needed:
dotnet build MigrateToWinUI.slnx --no-restore
- Run source-pinned analysis first. Prefer explicit
--source avalonia when Avalonia is known.
dotnet run --project src/MigrateToWinUI.Cli -- analyze <sln|csproj|dir> --source avalonia --target both --format json --report out/migration/avalonia-analysis.json
- Produce a human plan and detailed dashboard report.
dotnet run --project src/MigrateToWinUI.Cli -- plan <input> --source avalonia --target both --format md --out out/migration/plan.md
dotnet run --project src/MigrateToWinUI.Cli -- detail <input> --source avalonia --target both --format md --out out/migration/dashboard.md
- Preview safe rewrites before changing files.
dotnet run --project src/MigrateToWinUI.Cli -- convert <input> --source avalonia --target both --dry-run --preview out/migration/rewrite-preview.txt
- Stage target projects instead of overwriting the source tree.
dotnet run --project src/MigrateToWinUI.Cli -- compose <input> --source avalonia --target both --out out/target-projects --project-name MigratedApp --clean --allow-manual-review
Guardrails
- Do not apply rewrites until
convert output is reviewed.
- Treat
AW2U090x findings and manual review blockers as non-automatable work.
- Preserve original Avalonia source. Prefer
compose and staged target projects for broad migrations.
- Keep Uno overlays separate from shared WinUI-idiomatic code.
Expected Outputs
- JSON/SARIF/Markdown findings with
AW2U* diagnostics.
- Rewrite preview containing only safe edits unless rules are explicitly selected.
- Composed Uno/WinUI shell under the requested
--out directory.