Skip to content

Revert WinUI sample PackagedApp reference until packaged-app launch is supported#9913

Closed
Evangelink wants to merge 1 commit into
mainfrom
dev/amauryleve/revert-winui-packagedapp-ref
Closed

Revert WinUI sample PackagedApp reference until packaged-app launch is supported#9913
Evangelink wants to merge 1 commit into
mainfrom
dev/amauryleve/revert-winui-packagedapp-ref

Conversation

@Evangelink

Copy link
Copy Markdown
Member

Summary

This surgically reverts the three sample changes introduced by #9908 ("Wire WinUI MTP sample to Microsoft.Testing.Extensions.PackagedApp"), restoring the MSTestRunnerWinUI sample to its previous, working in-process state.

Why

The WinUI sample (samples/public/mstest-runner/MSTestRunnerWinUI) is a packaged (MSIX) app (EnableMsixTooling=true, Package.appxmanifest, ProjectCapability Include="Msix"). Referencing Microsoft.Testing.Extensions.PackagedApp auto-registers its ITestHostLauncher, which forces the platform's controller / deploy-and-launch path (registering any launcher sets requireProcessRestart=true).

However, the current PackagedAppTestHostLauncher only performs a CopyDirectory + Process.Start of the loose layout copy — it cannot launch a packaged/MSIX app. Proper PackageManager registration + AUMID activation is still a pending follow-up (#2784). As a result, #9908 made the sample build successfully but fail at launch, so it no longer demonstrates the intended runtime flow.

This reverts the reference until packaged-app (AUMID) activation lands, at which point the sample can be re-wired.

Changes

  1. MSTestRunnerWinUI.csproj — removed the Microsoft.Testing.Extensions.PackagedApp PackageReference and its explanatory comment. Other references (MSTest, WindowsAppSDK, etc.) are untouched.
  2. samples/public/Directory.Build.props — removed the MicrosoftTestingExtensionsPackagedAppVersion property and its comment. TestingPlatformVersion (2.3.2) is unchanged.
  3. UnitTestApp.xaml.cs — removed the comment block above builder.AddSelfRegisteredExtensions(cliArgs);, restoring the original adjacency of the two builder calls.

Verification

  • Built with the repo SDK: dotnet build samples\public\mstest-runner\MSTestRunnerWinUI\MSTestRunnerWinUI.slnx -c Release -p:Platform=x64 -p:TreatWarningsAsErrors=true0 Warning(s), 0 Error(s).
  • Confirmed the generated obj/.../SelfRegisteredExtensions.cs no longer contains Microsoft.Testing.Extensions.PackagedApp.

References

…s supported

The Microsoft.Testing.Extensions.PackagedApp launcher only supports launching a loose-layout copy via Process.Start today; it cannot launch the packaged (MSIX) WinUI sample. Referencing the package auto-registered its ITestHostLauncher, forcing the platform's deploy-and-launch path (registering a launcher sets requireProcessRestart=true), so PR #9908 made the sample runtime-broken. Revert the reference until AUMID activation (#2784) lands, restoring the sample's working in-process state.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: c5c7d634-e822-4475-9312-a9dde92753f6
Copilot AI review requested due to automatic review settings July 13, 2026 19:57

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.

Pull request overview

Restores the WinUI sample’s working in-process execution until packaged/MSIX activation is supported.

Changes:

  • Removes the PackagedApp package reference and version property.
  • Removes obsolete launcher registration comments.
Show a summary per file
File Description
UnitTestApp.xaml.cs Removes obsolete PackagedApp registration commentary.
MSTestRunnerWinUI.csproj Removes the PackagedApp package reference.
Directory.Build.props Removes the unused PackagedApp version property.

Review details

  • Files reviewed: 3/3 changed files
  • Comments generated: 0
  • Review effort level: Medium

@github-actions github-actions Bot 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.

Note

🤖 Automated review by GitHub Copilot. Generated by the Expert Code Review workflow. To request a follow-up action, reply by tagging @copilot directly.

Expert Review Summary — PR #9913

Verdict: ✅ LGTM — clean revert of a broken sample reference.

This PR reverts the Microsoft.Testing.Extensions.PackagedApp additions from PR #9908 that made the WinUI sample runtime-broken (the launcher forced requireProcessRestart=true but can't actually launch an MSIX-packaged app yet).

Dimension Assessment

Dimension Rating Notes
Correctness Removes the root cause of the runtime breakage.
Completeness All three touchpoints (version property, PackageReference, code comment) reverted consistently.
Backward Compat N/A Sample code only.
Error Handling N/A No logic changes.
Security N/A
Performance N/A
Thread Safety N/A
Public API N/A Sample project.
Localization N/A
Documentation Comment removal appropriate — described behavior no longer applies.
Testing N/A WinUI sample not in CI.
Build Integration No orphaned properties.
Code Style Consistent with repo conventions.
Traceability References PR #9908 and issue #2784.

No actionable findings. Ship it. 🚀

@Evangelink Evangelink closed this Jul 14, 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.

2 participants