Repository navigation
[rel/4.5] Fix packaged MTP Test Explorer discovery and execution (#11993) - #12054
Merged
Amaury Levé (Evangelink) merged 1 commit intoOct 20, 2026
Merged
Conversation
Amaury Levé (Evangelink)
deleted the
dev/amauryleve/4-5-test-explorer-backport
branch
October 20, 2026 18:38
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.
Backport #11993, Fix packaged MTP discovery and execution in Visual Studio Test Explorer, to
rel/4.5.Test Explorer selects the
.build.appxrecipeas the test source and otherwise tries to execute that XML file, producing Win32 error 193. This generates source-adjacent launcher configurations that select the existing project-local packaged-app controller and explicitly preserve--server. The controller accepts bare/explicit JSON-RPC server arguments and the client port without weakening native SDK transport validation.Caller-owned/edited configurations, incremental generation, clean tracking, design-time builds, explicit opt-outs, and native run-command overrides retain the source fix's behavior. This does not fix packaged-project debugging.
Release scope and provenance
a7d7711ee4f843a0245b18ef3f3bdedfc9d1264a.2d7fec599ed4e12853560745f1b9317551204fbb.a223d46d5784d315e7bae2a04d85185b191dd2b3. Before publication, the live release tip was refreshed to851ffb1578b10fb7c79e6e96245a662481a43e56; its intervening changes are three unrelated server-client unit-test files, with no shipping-source/build-input changes.git merge-tree --write-tree origin/rel/4.5 HEADsucceeds and the PR diff remains exactly the original four files.net9/net10prefix-based controller selection and its omission of the main-onlyEnableMicrosoftTestingPlatformfixture property.The release-pinned SDK is
12.0.100-alpha.1.26480.103. FreshMSTest 4.5.2-devandMicrosoft.Testing.Platform 2.5.2-devpackages were built in this worktree. All six relevant package nuspecs identify the validated head, bothnet8.0/net9.0Windows controller payloads are complete, and the supplemental composed consumer's six cached nupkg files match the fresh Shipping package bytes and source paths exactly. No installed2.5.1payload or sibling worktree's2.5.2-devcache supplied that consumer.Microsoft.Testing.Extensions.PackagedApp.MSBuild.2.5.2-dev.nupkgSHA-256:6CF20CE32F01CD5AB91C119164DF0FFE3C0200183814AEF8C8A7D31819A42AAB.Executed validation
Use the repository-local toolchain bootstrapped by the release build scripts. A short process-only PATH was necessary because the inherited PATH prevented
cmd.exechildren from locating PowerShell. Build/consumer caches are worktree-local; the acceptance assembly additionally creates its own fresh effective package cache for every run.The full source-pack attempt generated the release packages, but its final repository-wide inventory audit failed, as detailed below. The two changed shipping products were then packed explicitly:
The two unit skips are intentionally non-Windows-only cases, not skipped regression proof. All nine new Test Explorer parser cases passed. All twelve retained
TestExplorer_acceptance cases executed and passed, including caller edits followed by build/clean/rebuild, opt-outs, and the apostrophe/ampersand intermediate-path case. The full 85-case class also executed native overrides, incompatible/missing payload handling, shipping-controller success/failure/empty results, timeout cancellation, and multi-target exit-code aggregation.Test-value evidence at the validated head
a223d46d5784d315e7bae2a04d85185b191dd2b3targets; retain the current controller and tests. Both generation rows fail with missing.launcher.config.json, exit 2. Restore the original nupkg byte-for-byte and rerun the same rows.net8.0consumer loads the generated recipe launcher and starts its actual packaged controller. Honor the passive controller'smultipleConnectionProvider=truehandshake, then initialize its separate test-host connection and issue discover/run requests. Exercise both--serverand--server jsonrpc.The retained counterfactual selection was:
The baseline targets were extracted with
git archiveand copied into the nupkg throughZipArchive; the package was restored infinally. The restored SHA-256 is the original6CF20CE32F01CD5AB91C119164DF0FFE3C0200183814AEF8C8A7D31819A42AAB.Supplemental shipping-protocol consumer build:
The supplemental harness reads
ProtocolConsumer.build.launcher.config.json, adds only the client host/ephemeral port (andjsonrpcfor the explicit variant), initializes both advertised connections, and sendstesting/discoverTests,testing/runTests, andexit. It checks exact test counts, application marker contents, and parent exit status. This is additional composed-product evidence, not a substitute for the retained acceptance regressions.Limits and failed broader check
No discoverable Visual Studio installation was available (
vswhere -latest -products '*' -format jsonreturned[]), so real Test Explorer and registered WinUI/UWP activation were not exercised. No packaged-debugging fix, full acceptance-suite run, or CI result is claimed.The final full-source pack attempt used:
Exit 1: the final
eng\verify-nupkgs.ps1inventory check expected classic UAP assets deliberately omitted bySkipUapTargetFramework=true: MSTest 10/9 expected/actual files, TestAdapter 76/64, TestFramework 105/88. No source or audit-gate change was made to hide this. The affected modern-.NET controller packages and the actual consumers described above were validated separately; classic UAP packaging/full-inventory validation remains unavailable here.Earlier environment/bootstrap attempts also exposed the oversized PATH and the source-glob analyzer-generator build-order issue; neither required a product change. A first single-connection scratch protocol client stalled because it ignored the passive controller's advertised capability; the successful supplemental runs use the correct two-connection contract.
Local artifacts are retained:
artifacts\log\backport-*.binlog/transcripts,artifacts\log\backport-package-provenance.json, bothartifacts\TestResults\green-*\*.trx, and session counterfactual/protocol transcripts, marker files, and JSON summaries. They are not uploaded/public CI artifacts; the commands, exact counts, hashes, and result excerpts above are the reviewer-facing evidence.