Repository navigation
Honor -p:Configuration for C++ projects in winapp run - #1085
Nikola Metulev (nmetulev) merged 6 commits into
Conversation
On a .vcxproj, -p:Configuration=Release was dropped and the run used Debug. It now selects the configuration like -c; -c and -p Configuration with different values fail before building. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟢 Approval recommended
The implementation matches the issue requirements, and the Release build, targeted tests, and CLI scenarios passed.
0 open findings
What changed in this PR
This PR makes winapp run honor -p:Configuration for C++ projects while preserving .NET behavior.
Changes:
- Resolves C++ configuration from
-p Configuration=X. - Rejects conflicting
-cand-p Configurationvalues. - Adds tests and updates C++ usage documentation.
| File | Description |
|---|---|
ProjectRunService.Cpp.cs |
Extracts and forwards the effective C++ configuration. |
RunCommand.ProjectMode.cs |
Applies configuration precedence and conflict validation. |
RunCommandProjectModeTests.cs |
Tests selection and conflict behavior. |
ProjectRunServiceCppTests.cs |
Tests property parsing and MSBuild tokens. |
docs/usage.md |
Documents C++ configuration selection. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…roj-configuration-property
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. ✅ 8801 passed, 39 skipped out of 8840 tests in 1695.2s (+5 tests, +11.1s vs. baseline) Test Coverage✅ 87.6% line coverage, 82% branch coverage · ✅ no change vs. baseline CLI Startup Time59ms 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))) 1085Switching 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 1085Run Updated 2026-10-16 00:07:45 UTC · commit |
…roj-configuration-property
…roj-configuration-property
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 1505c85e-cfaf-4e5f-ba25-3305180259fb
Conflict in docs/usage.md (C++ run notes): kept the DevTools line and main's -c / -p:Configuration line from #1085. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
What and why
Visual Studio users often pick the build configuration with
-p:Configuration=Release. On a C++.vcxproj,winapp runignored that property and usedDebug. With--no-build, it then looked for the Debug output instead of the Release build you asked for.Now
-p:Configuration=Xon a.vcxprojworks like-c X, the same way-p:Platformalready picks the architecture. If you pass both-cand-p:Configurationwith different values, winapp stops before building and tells you to pass only one. .NET projects don't change.Fixes #1075
Before / after
The command runs against a stub
AppHost.vcxprojthat hasn't been built, so both runs end with "executable not found". The header line and the path winapp looks for show the difference.Before (main):
Debug | arm64, looking inARM64\DebugAfter (this branch):
Release | arm64, looking inARM64\Release. Conflicting-cand-p:Configurationvalues fail with one line.Not tested / risks
I only tested on a stub
.vcxproj, not on a full C++ app build.Checklist
plugins/winapp/skills/updated if user-facing behavior changedNotes for reviewers
-c release -p:Configuration=Releaseis allowed.