Repository navigation
Fix C++/WinRT response-file paths containing spaces - #1174
leileizhang (lei9444) wants to merge 1 commit into
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟢 Approval recommended
The narrow fix uses standard argument handling and covers the original failure with a regression test; no blocking issues were identified.
No open issues 🎉
What changed in this PR
Fixes C++/WinRT header generation for project folders containing spaces by passing the response-file path as one process argument.
Changes:
- Uses
ArgumentListto preserve the complete response-file path. - Adds a regression test that rejects split arguments and checks the received path.
| File | Description |
|---|---|
| src/winapp-CLI/WinApp.Cli/Services/CppWinrtService.cs | Passes @ and the full response-file path as one argument. |
| src/winapp-CLI/WinApp.Cli.Tests/CppWinrtServiceTests.cs | Tests response-file argument handling for paths containing spaces. |
Review effort: Balanced
Restore native sources and tests to main and keep the WinUI sample focused on the counter. The C++/WinRT response-file fix and space-path regression are tracked separately in #1174; Python workflow fixtures use ordinary directory names. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Build Metrics ReportValidation passed. All required build and validation jobs succeeded. Binary Sizes
.NET Test Results (TRX reports)Other suites are reflected in the overall validation status above. ✅ 10670 passed, 43 skipped out of 10713 tests in 1838.6s (+6 tests, -745.7s vs. baseline) Test Coverage✅ 87.4% line coverage, 81.5% branch coverage · ✅ no change vs. baseline CLI Startup Time54ms median (x64, Try This BuildInstalls the MSIX for your architecture, replacing any previously installed build. Needs the GitHub CLI — the command offers to install it and sign you in if it is missing. & ([scriptblock]::Create((irm https://raw.githubusercontent.com/microsoft/winappCli/main/scripts/winapp-pr.ps1))) 1174Switching between builds often?Put the tool on your PATH once: & ([scriptblock]::Create((irm https://raw.githubusercontent.com/microsoft/winappCli/main/scripts/winapp-pr.ps1))) -AddToPathThen this build is just: winapp-pr 1174Run Updated 2026-10-23 11:22:34 UTC · commit |
What and why
Fixes C++/WinRT header generation when a project folder contains spaces. The response file (the file containing the tool's options) was passed as an unquoted command string. Its path could be split into several arguments. Pass
@and the complete path as one argument instead.Before / after
To reproduce on Windows with access to the SDK package feed, create a native project in a folder containing spaces, then initialize it:
Actual before: the C++/WinRT step receives a split response-file path and fails with
cppwinrt execution failed.Expected after:
@...\project with spaces\.winapp\include\.cppwinrt.rspreaches the tool as one argument, so spaces do not prevent header generation.The screenshots show the isolated regression, not a full
initrun. It uses a batch stub that rejects a second argument. The same test fails against the main implementation and passes with this fix.Not tested / risks
The full SDK download and
winapp initworkflow was not run. The repository build published the x64 CLI, then stopped at ARM64 withPlatform linker not found; this machine has no ARM64 C++ build tools. Package builds and CI are not verified locally.Checklist
plugins/winapp/skills/updated if user-facing behavior changed — N/A: this restores existing behavior without changing commands or workflow.Notes for reviewers
Local validation used a process-scoped NuGet configuration: