Skip to content

Support C++ (.vcxproj) projects in winapp run - #984

Merged
Nikola Metulev (nmetulev) merged 27 commits into
mainfrom
nmetulev-cpp-vcxproj-run-support
Oct 8, 2026
Merged

Nikola Metulev (nmetulev) merged 27 commits into
mainfrom
nmetulev-cpp-vcxproj-run-support

Conversation

@nmetulev

@nmetulev Nikola Metulev (nmetulev) commented Oct 4, 2026 •

Copy link
Copy Markdown
Member

Description

winapp run only built .csproj projects. Pointing it at a Visual Studio C++ project failed, because the .NET SDK has no C++ project system.

Now winapp run accepts:

  • a .vcxproj,
  • a folder whose only runnable app is a .vcxproj (C# libraries or test projects beside it don't get in the way),
  • a .sln/.slnx whose only runnable app is a .vcxproj. If the solution also has a runnable C# app, the C# app is still picked (C# test projects don't outrank a C++ app); --project <name> selects the C++ one.

winapp finds Visual Studio's MSBuild.exe with vswhere (VS/Build Tools 2022 17.8+, the first with -getProperty, with the MSVC tools for the target architecture; for a WinUI/UWP project, the newest install whose MSBuild has the "Windows Store" C++ application type), restores packages.config, builds, reads OutDir/TargetPath/AppX properties, and then uses the existing packaged (loose-layout register + AUMID) or unpackaged (launch TargetPath) path. -c, --arch (→ x64/ARM64/Win32; -p Platform=ARM64 also selects the architecture when --arch isn't given), -p, --no-build, --no-restore, --detach and --json work as for .csproj. The Windows App Runtime version comes from packages.config. C++ inputs don't need the .NET SDK. --aot and --framework are rejected as .NET-only.

Build output is quiet: MSBuild runs at quiet verbosity (warnings and errors only), with a spinner and elapsed time in a real terminal, and a short command echo. --verbose shows MSBuild's full output and the exact command. (C++/WinRT logs ~500 lines on a first build at minimal.)

Before registering a packaged layout, winapp now also installs framework packages the build's .appxrecipe resolved and the manifest depends on, when missing or older — as Visual Studio's deploy does. C++ Debug apps depend on Microsoft.VCLibs.140.00.Debug.UWPDesktop; without it, registration on a clean machine (CI) failed with 0x80073CF3. Self-contained apps are unaffected (their manifest has no runtime dependency). Package locations on network shares or mapped network drives are ignored without being probed, so a crafted recipe can't make winapp authenticate to a remote host.

A C# app that references a C++ project (e.g. a native DLL, transitively and including ReferenceOutputAssembly="false" references) still can't be built by dotnet (MSB4278). winapp now detects it before restoring and says what works instead of surfacing the raw error. Conditional references (e.g. a Visual Studio-only native reference) are ignored, since dotnet skips them. winapp package suggests packaging the MSBuild output folder instead of --no-build, because dotnet publish --no-build still loads the C++ reference.

> winapp run App.csproj                # App.csproj -> Native.vcxproj (C++ DLL)
❌ 'App.csproj' references the C++ project 'Native.vcxproj', which dotnet can't build. Build it with Visual Studio or MSBuild.exe (Visual Studio or Build Tools 2022 17.8+ with the "Desktop development with C++" workload), then re-run this command with --no-build.

> MSBuild.exe App.csproj -restore -p:Platform=x64 ; winapp run App.csproj --no-build
Native Add(2,3) = 5

Before this PR the same command printed only error MSB4278: The imported file "$(VCTargetsPath)\Microsoft.Cpp.Default.props" does not exist ....

Missing prerequisites produce actionable errors: no VS/Build Tools or no C++ tools (with a winget command for Build Tools), and build failures caused by a missing platform toolset (MSB8020) or Windows SDK (MSB8036).

ProjectRunResolution now carries the evaluated Configuration and Platform alongside the existing TargetDir/AppxRecipePath/AppxManifestPath, so later work (e.g. DevTools XAML source mapping) can locate C++ build artifacts the same way it does for .csproj.

New sample samples/cpp-winui-app: the Visual Studio WinUI Blank App (Packaged) C++/WinRT template (XAML UI, packages.config, WinAppSDK 2.3.1) with a button that shows the package identity, plus a Pester test and CI matrix entry.

Usage Example

Observed on this machine (VS 2026 Enterprise, x64). Before:

> winapp run CppWinUIApp.vcxproj
❌ '...\CppWinUIApp.vcxproj' is not a runnable input. Pass a .cs file-based app, a .csproj, a .sln/.slnx solution, a directory containing one, or a build-output folder.

> winapp run . --json
{ "Error": "The manifest contains a placeholder for the executable but no .exe files were found in the input folder. ..." }

After (sample folder):

> winapp run . --detach
🔎 CppWinUIApp.vcxproj  ·  Debug | x64  ·  CppWinUIApp.slnx (only runnable project)
🔧 Building CppWinUIApp.vcxproj (Debug | x64)...
   MSBuild.exe CppWinUIApp.vcxproj -restore -p:Configuration=Debug -p:Platform=x64
⠋ MSBuild is running... 28s          ← transient spinner, replaced by the next line
✅ Built CppWinUIApp in 85.6s
✅ cpp-winui-app-sample_md30f2v49kz6j launched (PID: 13892)

> winapp run CppWinUIApp.vcxproj --detach --json      # incremental, 10s
{ "AUMID": "cpp-winui-app-sample_md30f2v49kz6j!App", "ProcessId": 476 }

> winapp run . --no-build --detach                     # 4s, no MSBuild build
✅ cpp-winui-app-sample_md30f2v49kz6j launched (PID: 27208)

The launched app's XAML UI works with identity (via winapp ui, no real input):

> winapp ui invoke "Show package identity" -a 37880
Invoked btn-identitybutton-6f2e via InvokePattern
> winapp ui search "Package family name" -a 37880
  IdentityText Text "Package family name: cpp-winui-app-sample_md30f2v49kz6j"

Missing prerequisites (VS hidden by pointing %ProgramFiles(x86)% elsewhere; toolset/SDK via -p):

> winapp run .
❌ Building a C++ project (.vcxproj) needs Visual Studio or Build Tools for Visual Studio 2022 version 17.8 or later with the MSVC C++ build tools for x64, but no Visual Studio or Build Tools for Visual Studio installation was found.
  - Install Visual Studio with the "Desktop development with C++" workload. WinUI 3 apps also need the "WinUI application development" workload with "C++ WinUI app development tools".
  - Or install Build Tools for Visual Studio: winget install Microsoft.VisualStudio.BuildTools --override "--wait --passive --add Microsoft.VisualStudio.Workload.VCTools --add Microsoft.VisualStudio.ComponentGroup.UWP.VC.BuildTools --includeRecommended"

> winapp run . -p WindowsTargetPlatformVersion=10.0.99999.0
❌ Build failed for CppWinUIApp.vcxproj. The Windows SDK version this project targets is not installed (MSB8036). Install it with the Visual Studio Installer or winget (e.g. winget install Microsoft.WindowsSDK.10.0.26100), or build against an installed one with -p:WindowsTargetPlatformVersion=<version>.

> winapp run . -p PlatformToolset=v999 --json
{ "Error": "Build failed for CppWinUIApp.vcxproj. The C++ build tools (platform toolset) this project targets are not installed (MSB8020). ..." }

> winapp run . -p Platform=ARM64 --no-build          # selects arm64
🔎 CppWinUIApp.vcxproj  ·  Debug | arm64  ·  CppWinUIApp.slnx (only runnable project)
> winapp run . --arch x64 -p Platform=ARM64
❌ -p Platform targets arm64, but --arch/--runtime selects x64. Pass only one of them.

> winapp run .                                        # folder with only a C++ DLL project
❌ NativeLib.vcxproj in '...\NativeLib' builds a library, not an app, so there is nothing to run. Run the app project that uses it, or pass a build-output folder that contains an app.

Unpackaged C++ console app (hand-written minimal .vcxproj):

> winapp run . -- hello world
✅ Built HelloConsole in 1.5s
✅ No Windows App SDK reference — runtime not needed
✅ Launched HelloConsole (PID: 23904)
Hello from a C++ console app, 2 arg(s)
(exit code 7 propagated)

Related Issue

Part of #680. Covers .vcxproj as the entry project. For a C# app that references a C++ project, winapp now detects it and says what to do; actually building that mix with MSBuild is a follow-up, as is the NativeAOT-publish preflight from the issue comment.

Type of Change

  • ✨ New feature

Checklist

  • New tests added for new functionality (ProjectRunServiceCppTests: input resolution, MSBuild arguments, packaging, prerequisite errors, vswhere discovery, packages.config, recipe frameworks, C# → C++ reference detection)
  • Tested locally on Windows
  • Main README.md updated
  • docs/usage.md updated
  • Language-specific guides updated (cpp.md pointer)
  • Sample projects updated (new cpp-winui-app + Pester test + CI matrix)
  • Shipped skills updated in plugins/winapp/skills/ (winapp-setup, winapp-troubleshoot)

Screenshots / Demo

CLI change; textual output above.

Additional Notes

Validation (local):

  • scripts\build-cli.ps1 (warnings-as-errors test build): WinApp.Cli.Tests 7129 total, 0 failed. WinApp.UIAutomation.Tests had 1 failure, RecordAsync_FirstScreenFrame_AcceptsAModalDialogTheTargetOwns, which also fails when run alone on this shared desktop; this PR doesn't touch UIAutomation. validate-plugin-package.ps1 passes. After merging Stop tracking generated command wrappers and schema snapshots #997 (generated schema and npm wrappers are no longer tracked), this PR changes no generated files. After review fixes: ProjectRunService*/RunCommand*/PackageCommand*/MsixService* tests 1144 total, 0 failed (WAE build).
  • samples\cpp-winui-app\test.Tests.ps1 with the locally built npm package (isolated npm prefix): 4/4 passed — build + register + detached launch with a visible window, --no-build --no-launch, missing-VS error, and a plain MSBuild build of the sample.
  • scripts\tests\artifact-workflow.Tests.ps1: 25/25.
  • CI: samples / cpp-winui-app on windows-latest (VS 2022) failed registration with 0x80073CF3 (missing Microsoft.VCLibs.140.00.Debug.UWPDesktop) before the framework step and passes 4/4 with it (the test runs --json, which hides the install status line). Locally, the install path was exercised by raising the recipe's VCLibs version: 📦 Installing framework package Microsoft.VCLibs.140.00.Debug.UWPDesktop 14.0.99999.0... followed by successful registration.
  • Mixed C# → C++ DLL project (hand-written): the new error above with and without --json; after MSBuild.exe the --no-build run printed Native Add(2,3) = 5.

Limitations / observations:

  • The winget Build Tools command was not executed (multi-GB install on a shared machine); its component IDs come from the Build Tools workload/component reference.
  • With VS 2026 (MSBuild 18.9) on this machine, the template's Microsoft.Windows.SDK.BuildTools.MSIX task fails with MSB4061 ("Type must be a type provided by the runtime") when the project sits under a long path (reproduced at ~157-char project dir; works from %TEMP%\cwa). That's an MSBuild/MSIX tooling issue independent of winapp — the same msbuild command fails the same way — so live runs used a short path.
  • Every scenario above was also captured in real Windows Terminal windows; the quiet build, short command echo, -p Platform and library-folder changes came from reviewing those screenshots.

winapp run now accepts a .vcxproj, a folder whose only runnable app is a
.vcxproj, or a solution whose only runnable app is a .vcxproj. It locates
Visual Studio's MSBuild with vswhere (requiring the MSVC tools for the target
architecture), restores packages.config, builds, evaluates OutDir/TargetPath/
AppX properties, and reuses the existing packaged/unpackaged launch paths.
Missing VS/Build Tools, platform toolset (MSB8020) and Windows SDK (MSB8036)
produce actionable errors. The Windows App SDK version for runtime
provisioning is read from packages.config.

Adds the cpp-winui-app sample (VS WinUI Blank App (Packaged) C++/WinRT
template with XAML UI), its Pester test and CI matrix entry.

Part of #680.

Co-authored-by: Copilot App <[email protected]>
@nmetulev Nikola Metulev (nmetulev) added the agent-preparing Agent is addressing feedback or completing required validation and CI label Oct 4, 2026
…xproj, require MSBuild 17.8

Co-authored-by: Copilot App <[email protected]>
…ring

C++ Debug packaged apps depend on Microsoft.VCLibs.140.00.Debug.UWPDesktop. Visual
Studio installs it on deploy; winapp now installs any recipe-resolved framework
package that is missing or older, so registration doesn't fail with 0x80073CF3.

Co-authored-by: Copilot App <[email protected]>
@github-actions

github-actions Bot commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

Build Metrics Report

Validation passed. All required build and validation jobs succeeded.

Binary Sizes

Artifact Baseline Current Delta
CLI (ARM64) 57.49 MB 57.59 MB 📈 +107.0 KB (+0.18%)
CLI (x64) 57.52 MB 57.62 MB 📈 +102.5 KB (+0.17%)
MSIX (ARM64) 23.87 MB 23.92 MB 📈 +58.2 KB (+0.24%)
MSIX (x64) 25.35 MB 25.40 MB 📈 +48.5 KB (+0.19%)
NPM Package 49.80 MB 49.89 MB 📈 +87.2 KB (+0.17%)
NuGet Package 49.90 MB 49.99 MB 📈 +95.5 KB (+0.19%)

.NET Test Results (TRX reports)

Other suites are reflected in the overall validation status above.

✅ 8163 passed, 37 skipped out of 8200 tests in 1396.7s (+52 tests, +304.7s vs. baseline)

Test Coverage

✅ 86.5% line coverage, 81.1% branch coverage · ✅ no change vs. baseline

CLI Startup Time

49ms median (x64, winapp --version) · ✅ -9ms vs. baseline

Try This Build

Installs 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))) 984
Switching between builds often?

Put the tool on your PATH once:

& ([scriptblock]::Create((irm https://raw.githubusercontent.com/microsoft/winappCli/main/scripts/winapp-pr.ps1))) -AddToPath

Then this build is just:

winapp-pr 984

Run winapp-pr with no arguments to pick from a list of open PRs.


Updated 2026-10-08 02:20:44 UTC · commit 2cda41e · workflow run

@nmetulev
Nikola Metulev (nmetulev) marked this pull request as ready for review October 4, 2026 20:27
Copilot AI balanced review requested due to automatic review settings October 4, 2026 20:27
@nmetulev Nikola Metulev (nmetulev) added ready-for-review Agent work and technical checks complete; awaiting review or re-review, not approval or merge and removed agent-preparing Agent is addressing feedback or completing required validation and CI labels Oct 4, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Architecture overrides and manifest-based framework discovery can currently provision the wrong dependencies or fail registration.

Review effort: Balanced
Findings: 2 High severity

Open (2)
What changed in this PR

Extends winapp run to build and launch C++ .vcxproj applications using Visual Studio MSBuild.

Changes:

  • Adds C++ project discovery, MSBuild execution, package resolution, and prerequisite guidance.
  • Installs framework packages referenced by generated app recipes.
  • Adds comprehensive tests, documentation, CI coverage, and a C++/WinUI sample.
File Description
src/​winapp-npm/​src/​winapp-commands.ts Regenerates TypeScript wrappers.
src/​winapp-CLI/​WinApp.Cli/​Services/​ProjectRunService.Input.cs Resolves C++ projects and solutions.
src/​winapp-CLI/​WinApp.Cli/​Services/​ProjectRunService.cs Routes C++ builds to MSBuild.
src/​winapp-CLI/​WinApp.Cli/​Services/​ProjectRunService.Cpp.cs Implements C++ build and output resolution.
src/​winapp-CLI/​WinApp.Cli/​Services/​MsixService.Identity.cs Installs recipe framework dependencies.
src/​winapp-CLI/​WinApp.Cli/​Services/​MSBuildService.cs Locates and invokes Visual Studio MSBuild.
src/​winapp-CLI/​WinApp.Cli/​Services/​IProjectRunService.cs Documents .vcxproj inputs.
src/​winapp-CLI/​WinApp.Cli/​Services/​IMSBuildService.cs Defines the MSBuild service contract.
src/​winapp-CLI/​WinApp.Cli/​Services/​IDotNetService.cs Documents native package discovery.
src/​winapp-CLI/​WinApp.Cli/​Services/​DotNetService.cs Reads C++ packages.config.
src/​winapp-CLI/​WinApp.Cli/​Models/​ProjectRunModels.cs Carries evaluated configuration and platform.
src/​winapp-CLI/​WinApp.Cli/​Helpers/​PackagesConfigReader.cs Parses native NuGet package pins.
src/​winapp-CLI/​WinApp.Cli/​Helpers/​HostBuilderExtensions.cs Registers the MSBuild service.
src/​winapp-CLI/​WinApp.Cli/​Commands/​RunCommand.ProjectMode.cs Handles C++-specific run semantics.
src/​winapp-CLI/​WinApp.Cli/​Commands/​RunCommand.cs Advertises .vcxproj support.
src/​winapp-CLI/​WinApp.Cli.Tests/​RunCommandTests.cs Updates folder-mode diagnostics tests.
src/​winapp-CLI/​WinApp.Cli.Tests/​ProjectRunServiceTests.cs Injects the MSBuild test fake.
src/​winapp-CLI/​WinApp.Cli.Tests/​ProjectRunServiceSingleFileTests.cs Updates service construction.
src/​winapp-CLI/​WinApp.Cli.Tests/​ProjectRunServicePublishProfileTests.cs Updates service construction.
src/​winapp-CLI/​WinApp.Cli.Tests/​ProjectRunServiceCppTests.cs Tests C++ resolution, builds, and packages.
src/​winapp-CLI/​WinApp.Cli.Tests/​ProjectRunServiceAotTests.cs Updates service construction.
src/​winapp-CLI/​WinApp.Cli.Tests/​FakeMSBuildService.cs Adds an MSBuild test double.
scripts/​tests/​artifact-workflow.Tests.ps1 Updates expected sample coverage.
samples/​cpp-winui-app/​test.Tests.ps1 Exercises the sample workflow.
samples/​cpp-winui-app/​README.md Documents sample usage.
samples/​cpp-winui-app/​pch.h Adds precompiled C++ headers.
samples/​cpp-winui-app/​pch.cpp Compiles the precompiled header.
samples/​cpp-winui-app/​packages.config Pins native dependencies.
samples/​cpp-winui-app/​Package.appxmanifest Defines sample package identity.
samples/​cpp-winui-app/​MainWindow.xaml.h Declares the sample window.
samples/​cpp-winui-app/​MainWindow.xaml.cpp Implements identity display.
samples/​cpp-winui-app/​MainWindow.xaml Defines the sample UI.
samples/​cpp-winui-app/​MainWindow.idl Defines the WinRT window type.
samples/​cpp-winui-app/​CppWinUIApp.vcxproj.filters Organizes Visual Studio files.
samples/​cpp-winui-app/​CppWinUIApp.vcxproj Defines the C++/WinUI build.
samples/​cpp-winui-app/​CppWinUIApp.slnx Adds the sample solution.
samples/​cpp-winui-app/​App.xaml.h Declares the application type.
samples/​cpp-winui-app/​App.xaml.cpp Implements application startup.
samples/​cpp-winui-app/​App.xaml Defines application resources.
samples/​cpp-winui-app/​app.manifest Configures desktop compatibility.
samples/​cpp-winui-app/​.gitignore Excludes generated outputs.
samples/​cpp-winui-app/​Assets/​LockScreenLogo.scale-200.png Adds sample artwork.
samples/​cpp-winui-app/​Assets/​SplashScreen.scale-200.png Adds sample artwork.
samples/​cpp-winui-app/​Assets/​Square150x150Logo.scale-200.png Adds sample artwork.
samples/​cpp-winui-app/​Assets/​Square44x44Logo.scale-200.png Adds sample artwork.
samples/​cpp-winui-app/​Assets/​Square44x44Logo.targetsize-24_altform-unplated.png Adds sample artwork.
samples/​cpp-winui-app/​Assets/​StoreLogo.png Adds sample artwork.
samples/​cpp-winui-app/​Assets/​Wide310x150Logo.scale-200.png Adds sample artwork.
README.md Lists the new sample.
plugins/​winapp/​skills/​winapp-troubleshoot/​SKILL.md Updates troubleshooting guidance.
plugins/​winapp/​skills/​winapp-setup/​SKILL.md Documents C++ project mode.
docs/​usage.md Documents .vcxproj workflows.
docs/​npm-usage.md Regenerates npm API documentation.
docs/​guides/​cpp.md Links Visual Studio C++ guidance.
docs/​cli-schema.json Regenerates the CLI schema.
.github/​workflows/​test-samples.yml Adds the sample to CI.

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

dotnet can't build a .vcxproj (MSB4278). Detect one in the ProjectReference closure
before restoring and say to build with Visual Studio/MSBuild, then re-run with
--no-build (verified to work).

Co-authored-by: Copilot App <[email protected]>
@nmetulev Nikola Metulev (nmetulev) added agent-preparing Agent is addressing feedback or completing required validation and CI and removed ready-for-review Agent work and technical checks complete; awaiting review or re-review, not approval or merge labels Oct 4, 2026
dotnet publish --no-build still loads project references, so package advice is to
package the MSBuild output folder. Conditional references (e.g. VS-only) are
skipped so builds dotnet completes today aren't blocked.

Co-authored-by: Copilot App <[email protected]>
@nmetulev Nikola Metulev (nmetulev) added ready-for-review Agent work and technical checks complete; awaiting review or re-review, not approval or merge and removed agent-preparing Agent is addressing feedback or completing required validation and CI labels Oct 4, 2026

@zateutsch Zach Teutsch (zateutsch) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🤖 AI-generated review (winappcli pr-review skill) — verify before acting.

C++ support works end to end: the cpp-winui-app sample built, installed VCLibs Debug, registered, and launched on ARM64 with Build Tools 2026, and the ProjectRunService*/RunCommand* tests pass (631/631). One resolution gap contradicts the new docs.

Must fix

winapp run . ignores the C++ app when the folder also has a C# library

  • What is wrong: If the folder has any .csproj, only C# projects are considered. When none of them is runnable, winapp falls back to folder mode and never tries the .vcxproj.
  • Show me: a folder with CppWinUIApp.vcxproj and a library Shared.csproj (OutputType=Library):
    • winapp run . --no-build --no-launch → ❌ The manifest contains a placeholder for the executable but no .exe files were found in the input folder…
    • Expected: run the C++ app, as winapp run CppWinUIApp.vcxproj --no-build --no-launch does.
  • Why it matters: docs/usage.md says the folder only needs one runnable app, and a C# helper library next to a C++ app is a common layout. Users hit the same misleading error this PR set out to remove.
  • Smallest fix: when no runnable C# app is found, fall through to the .vcxproj candidates. Or narrow the docs to "a folder with a .vcxproj and no .csproj".
  • Location: src/winapp-CLI/WinApp.Cli/Services/ProjectRunService.Input.cs (directory resolution, ~L91-178)

Non-blocking

Shipped Copilot agent doesn't know run accepts .vcxproj

  • What is wrong: plugins/winapp/com.github.copilot/agents/winapp.agent.md (L49, L227, L248) describes run project mode as .csproj/.sln built with dotnet build, needing the .NET SDK.
  • Why it matters: agent users asking how to run a .vcxproj won't be pointed at the new feature. The troubleshoot skill already covers it.
  • Smallest fix: add .vcxproj and the Visual Studio/Build Tools C++ prerequisite to the decision tree and the project-mode Purpose and Requires lines.

- Build quietly (warnings/errors only) with a spinner in terminals; --verbose
  shows MSBuild's full output and exact command
- Echo a short MSBuild command instead of the full plumbing
- -p Platform selects the architecture when --arch/--runtime aren't given
- winapp's MSB8020/MSB8036 explanation replaces the raw line in terminals
- A folder with only a C++ library explains there is nothing to run
- A folder with a C++ app plus C# libraries/tests runs the C++ app
- Copilot agent knows run accepts .vcxproj

Co-authored-by: Copilot App <[email protected]>
@nmetulev Nikola Metulev (nmetulev) added agent-preparing Agent is addressing feedback or completing required validation and CI and removed ready-for-review Agent work and technical checks complete; awaiting review or re-review, not approval or merge labels Oct 5, 2026
@nmetulev

Copy link
Copy Markdown
Member Author

Zach Teutsch (@zateutsch) thanks — both findings addressed in bb45b49.

winapp run . ignores the C++ app when the folder also has a C# library — fixed. When a folder's .csproj files contain no runnable app (or only a test project), the .vcxproj app is used; --project can also select a .vcxproj there. A runnable C# app still wins. Reproduced your layout (sample without its .slnx + Shared.csproj library): before → ❌ The manifest contains a placeholder for the executable but no .exe files were found…; after:

> winapp run . --no-launch
🔎 CppWinUIApp.vcxproj  ·  Debug | x64
🔧 Building CppWinUIApp.vcxproj (Debug | x64)...
   MSBuild.exe CppWinUIApp.vcxproj -restore -p:Configuration=Debug -p:Platform=x64
✅ Built CppWinUIApp in 72.3s
✅ cpp-winui-app-sample_md30f2v49kz6j registered (AUMID: cpp-winui-app-sample_md30f2v49kz6j!App)

Tests: ResolveInput_DirectoryWithCppAppAndCsharpLibrary_PicksCppApp (one and several libraries), …AndCsharpTests_PicksCppApp, …WithCsharpAppAndCppApp_KeepsCsharpApp (+ --project Helper).

Copilot agent doesn't know run accepts .vcxproj — fixed: decision tree entry, project-mode Purpose, and Requires line now cover .vcxproj and the VS/Build Tools C++ prerequisite.

…er .vcxproj selectors

- Fall back to a C++ app only when no C# app is runnable (two C# apps stay ambiguous)
- Report a library-only C++ folder in the run command, only when no manifest is
  available from --manifest, the folder, or the current directory
- --project Foo.vcxproj prefers the .vcxproj over a same-named .csproj
- --project mismatch lists C++ apps too

Co-authored-by: Copilot App <[email protected]>
This was referenced Nov 11, 2026
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.

3 participants