Skip to content

docs: make execution alias step explicit for console apps in .NET and Rust guides#482

Merged
nmetulev merged 7 commits into
mainfrom
fix/dotnet-guide-console-output
Apr 21, 2026
Merged

docs: make execution alias step explicit for console apps in .NET and Rust guides#482
nmetulev merged 7 commits into
mainfrom
fix/dotnet-guide-console-output

Conversation

@nmetulev
Copy link
Copy Markdown
Member

Fixes #470

Problem

Both the .NET and Rust guides build console apps by default (dotnet new console / cargo new), but the execution-alias step was framed as an optional side-note. Users skip it and then dotnet run (or winapp run --with-alias) launches the packaged app via AUMID activation — opening a new window that closes immediately when a console app finishes, swallowing all stdout.

The repro in the issue was just ""follow the .NET guide"" — exactly what happens when the alias step is easy to miss.

Changes

docs/guides/dotnet.md

  • Promote alias setup to its own subsection in step 4 (after winapp init), covering both winapp manifest add-alias and adding <WinAppRunUseExecutionAlias>true</WinAppRunUseExecutionAlias> to the .csproj.
  • Remove the buried ""Console apps:"" blockquote from step 5 (now redundant — handled before users hit dotnet run).
  • Slim step 7's duplicate alias section to a one-liner pointing back to step 4 (with a fallback winapp manifest add-alias for users who skipped it). Removed the long manual XML snippet.

docs/guides/rust.md

  • Reframe the existing alias section in step 4 to clearly state it's required for console apps (which is the cargo new default), with explicit ""skip if UI app"" guidance.
  • Remove the long manual XML alternative — winapp manifest add-alias does the same thing in one command.

The actual CLI/MSBuild support (--with-alias, WinAppRunUseExecutionAlias, winapp manifest add-alias) already works correctly. This is purely a guide/framing fix.

Verification

  • Re-read both guide flows end-to-end after the edits.
  • Confirmed winapp manifest add-alias and the WinAppRunUseExecutionAlias MSBuild property still match the live CLI / NuGet targets (dotnet-run-support.md, ManifestAddAliasCommand.cs, sample samples/dotnet-app/dotnet-app.csproj).

Both the .NET and Rust guides build console apps by default, but
buried the execution-alias setup as an optional/easy-to-skip step.
Without the alias, `dotnet run` (and `winapp run --with-alias`)
launches the app via AUMID activation, which opens a new window
that closes immediately when a console app finishes — swallowing
any output.

dotnet guide:
- Promote alias setup to its own step in section 4 (after init),
  covering both `winapp manifest add-alias` and the
  `WinAppRunUseExecutionAlias` csproj property.
- Remove the buried "Console apps:" blockquote from section 5.
- Slim section 7's duplicate alias section to point back to step 4.

rust guide:
- Reframe the existing alias section in step 4 to clearly state
  it is required for console apps (which is the cargo new default).
- Remove the long manual XML alternative; `winapp manifest add-alias`
  does the same thing.
- Add explicit "Skip this step if you're building a UI app" callout.

Fixes #470

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 20, 2026 21:50
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Updates the .NET and Rust packaging guides to make the execution-alias step explicit (and clearly required for console apps) so development runs keep stdout in the current terminal instead of launching via AUMID into a transient window.

Changes:

  • .NET guide: promotes execution-alias setup into an explicit step (manifest alias + MSBuild property), and removes/reduces duplicated/“easy to miss” guidance later.
  • Rust guide: reframes the alias step as required for cargo new console apps, with clear “skip for UI app” guidance, and removes the long manual XML alternative.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
docs/guides/rust.md Makes execution-alias required/explicit for default console apps and removes manual XML instructions.
docs/guides/dotnet.md Adds a dedicated alias subsection (manifest + MSBuild property) and reduces redundant alias instructions later in the guide.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/guides/dotnet.md Outdated
Comment thread docs/guides/rust.md Outdated
Comment thread docs/guides/rust.md Outdated
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 20, 2026

Build Metrics Report

Binary Sizes

Artifact Baseline Current Delta
CLI (ARM64) 30.66 MB 30.66 MB ✅ 0.0 KB (0.00%)
CLI (x64) 31.02 MB 31.02 MB ✅ 0.0 KB (0.00%)
MSIX (ARM64) 12.94 MB 12.94 MB 📈 +0.4 KB (+0.00%)
MSIX (x64) 13.74 MB 13.74 MB 📈 +0.1 KB (+0.00%)
NPM Package 26.90 MB 26.90 MB 📈 +0.1 KB (+0.00%)
NuGet Package 26.98 MB 26.98 MB 📈 +0.5 KB (+0.00%)
VS Code Extension 19.72 MB 19.72 MB 📈 +0.8 KB (+0.00%)

Test Results

783 passed, 1 skipped out of 784 tests in 400.9s (-2.6s vs. baseline)

Test Coverage

21.4% line coverage, 36.6% branch coverage · ✅ no change vs. baseline

CLI Startup Time

45ms median (x64, winapp --version) · ✅ +6ms vs. baseline


Updated 2026-04-21 18:17:01 UTC · commit f4c164c · workflow run

nmetulev and others added 2 commits April 20, 2026 16:31
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
The manifest registers the alias with .exe (e.g., rust-app.exe), but
users can invoke it as either 'rust-app' or 'rust-app.exe'. Addresses
PR #482 review feedback.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Comment thread docs/guides/dotnet.md Outdated
Comment thread docs/guides/rust.md Outdated
nmetulev and others added 4 commits April 21, 2026 17:52
Copy link
Copy Markdown
Contributor

@Jaylyn-Barbee Jaylyn-Barbee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@nmetulev nmetulev merged commit daa484f into main Apr 21, 2026
21 checks passed
@nmetulev nmetulev deleted the fix/dotnet-guide-console-output branch April 21, 2026 18:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Using winapp run with a .NET console app swallows console messages

4 participants