Revert WinUI sample PackagedApp reference until packaged-app launch is supported#9913
Closed
Evangelink wants to merge 1 commit into
Closed
Revert WinUI sample PackagedApp reference until packaged-app launch is supported#9913Evangelink wants to merge 1 commit into
Evangelink wants to merge 1 commit into
Conversation
…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
Contributor
There was a problem hiding this comment.
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
Contributor
There was a problem hiding this comment.
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. 🚀
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This surgically reverts the three sample changes introduced by #9908 ("Wire WinUI MTP sample to Microsoft.Testing.Extensions.PackagedApp"), restoring the
MSTestRunnerWinUIsample 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"). ReferencingMicrosoft.Testing.Extensions.PackagedAppauto-registers itsITestHostLauncher, which forces the platform's controller / deploy-and-launch path (registering any launcher setsrequireProcessRestart=true).However, the current
PackagedAppTestHostLauncheronly performs aCopyDirectory+Process.Startof the loose layout copy — it cannot launch a packaged/MSIX app. ProperPackageManagerregistration + 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
MSTestRunnerWinUI.csproj— removed theMicrosoft.Testing.Extensions.PackagedAppPackageReferenceand its explanatory comment. Other references (MSTest, WindowsAppSDK, etc.) are untouched.samples/public/Directory.Build.props— removed theMicrosoftTestingExtensionsPackagedAppVersionproperty and its comment.TestingPlatformVersion(2.3.2) is unchanged.UnitTestApp.xaml.cs— removed the comment block abovebuilder.AddSelfRegisteredExtensions(cliArgs);, restoring the original adjacency of the two builder calls.Verification
dotnet build samples\public\mstest-runner\MSTestRunnerWinUI\MSTestRunnerWinUI.slnx -c Release -p:Platform=x64 -p:TreatWarningsAsErrors=true→ 0 Warning(s), 0 Error(s).obj/.../SelfRegisteredExtensions.csno longer containsMicrosoft.Testing.Extensions.PackagedApp.References