Conversation
Build Metrics ReportBinary Sizes
Test Results✅ 433 passed, 6 skipped out of 439 tests in 310.4s (+59 tests, -73.2s vs. baseline) Test Coverage❌ 56.7% line coverage, 58.2% branch coverage · CLI Startup Time32ms median (x64, Updated 2026-03-06 07:38:37 UTC · commit |
There was a problem hiding this comment.
Pull request overview
This PR introduces the winapp run command, which enables developers to create a loose-layout MSIX package, register a debug identity, and launch a packaged application. Additionally, it adds a new Microsoft.Windows.SDK.BuildTools.WinApp NuGet package with MSBuild targets that intercept dotnet run to automatically handle the full pack-and-launch pipeline for packaged WinUI apps.
Changes:
- New
winapp runCLI command (RunCommand.cs,AppLauncherService.cs,MsixService.AddLooseLayoutIdentityAsync) that copies app files, replaces manifest tokens, registers the package, and launches viaIApplicationActivationManager - New
Microsoft.Windows.SDK.BuildTools.WinAppNuGet package with MSBuild props/targets that hooks intodotnet runto invoke the CLI automatically - Enhancements to
WorkspaceSetupServiceandDotNetService(auto-detects existing WinAppSDK references, addsRuntimeIdentifier, fixesPublishProfilecondition, addsWINDOWS_SDK_BUILD_TOOLS_WINAPP_PACKAGEto the init flow)
Reviewed changes
Copilot reviewed 41 out of 43 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
src/winapp-CLI/WinApp.Cli/Commands/RunCommand.cs |
New command: packs folder, registers identity, launches app via AUMID |
src/winapp-CLI/WinApp.Cli/Services/AppLauncherService.cs |
New service: launches apps via IApplicationActivationManager, computes package family name |
src/winapp-CLI/WinApp.Cli/Services/IAppLauncherService.cs |
New interface for app launching |
src/winapp-CLI/WinApp.Cli/Services/MsixService.cs |
Adds AddLooseLayoutIdentityAsync, renames AddMsixIdentityAsync to AddSparseIdentityAsync, adds RegisterLooseLayoutPackageAsync |
src/winapp-CLI/WinApp.Cli/Services/IMsixService.cs |
Interface update: rename + new AddLooseLayoutIdentityAsync |
src/winapp-CLI/WinApp.Cli/Services/DotNetService.cs |
Adds EnsureRuntimeIdentifierAsync, UpdatePublishProfileAsync, HasPackageReferenceAsync, updated AddOrUpdatePackageReferenceAsync |
src/winapp-CLI/WinApp.Cli/Services/IDotNetService.cs |
Interface additions for new DotNetService methods |
src/winapp-CLI/WinApp.Cli/Services/WorkspaceSetupService.cs |
Auto-skips WinAppSDK prompt if already referenced; always adds build tools NuGet package |
src/winapp-CLI/WinApp.Cli/Services/StatusService.cs |
Suppresses rendering when LogLevel.None (JSON mode) |
src/winapp-CLI/WinApp.Cli/Helpers/HostBuilderExtensions.cs |
Registers IAppLauncherService + (accidentally) duplicates IDotNetService |
src/winapp-CLI/WinApp.Cli/Program.cs |
Adds --json flag parsing with LogLevel.None |
src/winapp-CLI/WinApp.Cli/Commands/WinAppRootCommand.cs |
Adds JsonOption and RunCommand to root |
src/winapp-NuGet/build/*.props / *.targets |
New MSBuild integration for dotnet run interception |
src/winapp-NuGet/Microsoft.Windows.SDK.BuildTools.WinApp.csproj |
New NuGet package project |
src/winapp-CLI/WinApp.Cli.Tests/RunCommandTests.cs |
Tests for new run command |
src/winapp-CLI/WinApp.Cli.Tests/DotNetServiceTests.cs |
Tests for new DotNetService methods |
src/winapp-CLI/WinApp.Cli.Tests/WorkspaceSetupServiceTests.cs |
Updated tests for new package install logic |
scripts/build-cli.ps1 / package-nuget.ps1 / setup-winapprun.ps1 |
Build/packaging scripts for the new NuGet package |
docs/usage.md, docs/llm-context.md, docs/dotnet-run-support.md, docs/cli-schema.json |
Documentation for new run command |
Resolve merge conflict from deleted docs/llm-context.md (removed in main). Add 'run' command to setup skill and 'cert info' to signing skill in generate-llm-docs.ps1 so they appear in auto-generated SKILL.md files. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Add run entry to README.md Commands Overview under App Identity & Debugging - Add full command reference for winapp run in winapp.agent.md - Update decision tree to include winapp run as preferred path for identity + launch workflow - Add run/debug usage section to setup skill template - Update recommended workflow to use winapp run instead of create-debug-identity for step 4 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Clearly separate the two commands throughout all documentation: - winapp run: registers a loose layout package (full folder) with Add-AppxPackage, simulating an MSIX install. Preferred for most frameworks during iterative development. - create-debug-identity: registers a sparse package pointing to an existing exe via Add-AppxPackage -ExternalLocation. Use when the exe is separate from app code (Electron) or testing sparse scenarios. Updated files: - winapp.agent.md: decision tree, command refs, rule #5, recipes, glossary - README.md: differentiated one-line descriptions - usage.md: added cross-references between both command sections - setup skill: updated key concepts and workflow - identity skill: clarified sparse-only focus with when-to-use guidance - frameworks skill: .NET quick start now uses winapp run - troubleshoot skill: added winapp run to decision tree and prereqs table - dotnet guide: winapp run as primary, create-debug-identity as alternative Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Clarify that .NET projects can add the Microsoft.Windows.SDK.BuildTools.WinApp NuGet package to enable 'dotnet run' with automatic identity registration. The package invokes 'winapp run' under the hood to create a loose layout package and launch the app. Updated files: - dotnet guide: NuGet package as recommended approach, manual MSBuild target as alternative - frameworks skill: added NuGet package to .NET quick start - winapp.agent.md: added dotnet run guidance to .NET section - sample READMEs (dotnet-app, wpf-app): clarified NuGet package usage - NuGet README: updated to describe winapp run mechanism Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
winapp init already adds Microsoft.Windows.SDK.BuildTools.WinApp to the .csproj alongside the other NuGet packages, so dotnet run works out of the box after init. Updated docs to reflect this: - dotnet guide: restructured step 5 to lead with 'dotnet run' since the NuGet package is already present, manual winapp run as alternative - frameworks skill: noted winapp init adds the package automatically - winapp.agent.md: updated .NET section accordingly Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Replace the manual ApplyDebugIdentity MSBuild target in dotnet-app and wpf-app samples with a PackageReference to Microsoft.Windows.SDK.BuildTools.WinApp. This enables 'dotnet run' to automatically register a loose layout package and launch with identity. Changes: - dotnet-app.csproj: removed ApplyDebugIdentity target, added WinApp NuGet package reference - wpf-app.csproj: same - samples/nuget.config: added local-winapp feed pointing to artifacts/nuget/ so locally-built NuGet packages are resolved - Updated sample READMEs: prerequisite is now building the CLI locally via build-cli.ps1 Both samples restore and build successfully. The PackageMsix targets for Release builds are preserved unchanged. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
## Description This PR adds an option to winapp run to launch the application with an execution alias for scnearios such as console apps or when acces to stdio is needed. It also adds a new command (winapp manifest add-alias) to simplify adding execution alias to a manifest The nuget is also updated with properties for passing the --with-alias option ## Related Issue <!-- Link to any related issues: Fixes #123, Closes #456, Related to #789 --> ## Type of Change <!-- Keep the applicable line(s), delete the rest --> - ✨ New feature ## Checklist <!-- Delete the ones that do not apply to your changes --> - [x] New tests added for new functionality (if applicable) - [x] Tested locally on Windows - [x] Main [README.md](../README.md) updated (if applicable) - [x] [docs/usage.md](../docs/usage.md) updated (if CLI commands changed) - [x] [Language-specific guides](../docs/guides) updated (if applicable) - [x] [Sample projects updated](../samples) to reflect changes (if applicable) - [x] Agent skill templates updated in `docs/fragments/skills/` (if CLI commands/workflows changed) --------- Co-authored-by: Nikola Metulev <711864+nmetulev@users.noreply.github.com>
Description
Adds winapp run command, that allows developers to pack a folder and run the application as a packaged application.
Usage Example
-->
Related Issue
Fixes #130
Type of Change
Checklist
Demo
Runs the app as a packaged windows app.
AI Description
The
winapp runcommand has been added, allowing developers to create a loose layout package from a specified build output folder, register it with Windows, and launch the application. This command improves the development experience by simulating a full MSIX installation. For example, you can use it as follows:Breaking Change: None.