Skip to content

Avoid duplicate runtime DLLs in the MSTest UWP adapter by @Evangelink in #12238 (backport to rel/4.5) - #12248

Merged
Amaury Levé (Evangelink) merged 2 commits into
microsoft:rel/4.5from
nohwnd-bot:backport/12238/to/rel/4.5
Nov 6, 2026
Merged

Amaury Levé (Evangelink) merged 2 commits into
microsoft:rel/4.5from
nohwnd-bot:backport/12238/to/rel/4.5

Conversation

@nohwnd-bot

@nohwnd-bot nohwnd-bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Backport of #12238 to rel/4.5

/cc Amaury Levé (@Evangelink)

Pull request

Summary

Backport the classic UWP adapter packaging correction from #12238. The UAP payload contains only the adapter and platform-services DLLs; required runtime assemblies are restored from their owning NuGet packages and included in AppX deployment.

The backport preserves the release branch's .NET 8/.NET 9 framework policy and modern UWP .NET 9 support. The README conflict is resolved without bringing over main-only F# documentation or .NET 10 platform requirements.

Design and decision record

The design and original red/green evidence are recorded in #12238. This is a servicing backport, not a new feature or architecture change.

Classic UWP still needs explicit AppX deployment because SDK Extras disables automatic copying of NuGet runtime assets. Keep the resolved-asset deployment target and UAP-only TRX/Retry dependencies; do not restore the duplicated package payload.

Demonstration

Verified UAP DLL entries in the freshly packed MSTest.TestAdapter 4.5.3-dev:

buildTransitive/uap10.0/MSTest.TestAdapter.dll
buildTransitive/uap10.0/MSTestAdapter.PlatformServices.dll

The UAP dependency group declares Microsoft.Testing.Extensions.TrxReport and Microsoft.Testing.Extensions.Retry at 2.5.3-dev. The packaged README is free of conflict markers, retains modern UWP .NET 9 support, and does not include main-only F# documentation.

No UI or report layout changes are involved; package contents and real packaged-host execution are the relevant evidence.

Validation and regression proof

Validated the release branch's own packages and toolchain, not the originating main-branch artifacts:

  • SDK 12.0.100-alpha.1.26480.103, Release, Windows x64; outer acceptance host net11.0.
  • Packages: MSTest 4.5.3-dev and Microsoft.Testing.Platform 2.5.3-dev.
  • Tested source: bot commit 2342499bd649e43dcb24059ab656c20863e12639 plus the README-only conflict correction, committed unchanged as 98cff9529422963e52a6319bc3de6815b2e4b76a.

Pack:

.\build.cmd -pack -c Release -bl

Result: exit 0, 0 warnings, 0 errors.

The execution command below preserves the executed options, with only the run-owned artifact directory represented by $results. A temporary short checkout alias let the unchanged release acceptance fixture create fresh short NuGet caches; no release test-infrastructure change was needed.

$project = 'test\IntegrationTests\MSTest.Acceptance.IntegrationTests\MSTest.Acceptance.IntegrationTests.csproj'
$filter = 'FullyQualifiedName~WindowsApplicationModelPackageTests|FullyQualifiedName~ClassicUwpTests|FullyQualifiedName~ModernUwpTests.ModernUwp_ConsumesUwpAssets_AndRunsPlainAndUiTestsThroughMtp'
$env:TESTFX_RUN_WINDOWS_APP_MODEL_TESTS = '1'
.\.dotnet\dotnet.exe test --project $project -c Release --no-build --filter $filter -p:UsingDotNetTest=true "-p:ArtifactsTestResultsDir=$results" "-bl:$results\execution.binlog" --show-test-results all

Independent release-source discovery and execution selected the same 18 cases: 18 passed, 0 failed, 0 skipped, exit 0. TRX, JUnit, and CTRF agree.

Requirement Release evidence Result
Package contents and UAP-only bootstrap dependency declarations WindowsApplicationModelPackageTests, including PackedMSTestTestAdapter_ClassicUwpDoesNotDuplicateRuntimeDependencies and both rows of PackedMSTestTestAdapter_ClassicUwpDeclaresBootstrapDependencies 13 package-contract cases passed.
Real classic UWP deployment/activation through all package entry points ClassicUwp_ConsumesUapAssets_AndRunsPlainAndUiTestsThroughMtp with MSTest.Sdk, MSTest, and direct adapter/framework references 3 passed.
Real modern UWP deployment/activation with release assets ModernUwp_ConsumesUwpAssets_AndRunsPlainAndUiTestsThroughMtp on net9.0-windows10.0.26100.0 and net10.0-windows10.0.26100.0 consumers 2 passed.

Each of the five real applications returned zero and produced a final TRX containing exactly the expected plain/UI test names, both passed: ten passing product results in total. Retry-attempt reports were not double-counted.

Provenance reconciliation matched 13 distinct local shipping-package hashes against 53 restored consumer-package entries and verified all thirty curated classic-UWP runtime dependencies. The registration leak check passed.

Logs, binlogs, result reports, and provenance are retained locally; no diagnostic artifacts have been uploaded. Separate legacy non-SDK UWP/VSTest execution and modern x86/ARM64 builds were not run. No new launcher/protocol/cancellation behavior was introduced. These are local results, not a claim that backport CI has passed.

Test-value evidence

The originating fix in #12238 has executed paired evidence: the same three new package cases failed on the original layout (12 instead of 2 DLLs, missing TRX/Retry dependencies) and passed with the correction.

On this release backport, all three package regressions and the real packaged-host consumers executed and passed using newly packed 4.5.3-dev / 2.5.3-dev artifacts. The old-layout counterfactual was not rerun on rel/4.5; main's paired run is not presented as a release-branch execution result. The additional conflict correction is documentation-only, and the actual packed README was checked for release-correct platform text and absence of conflict markers/main-only F# content.

Remove duplicate runtime DLLs from the adapter package while preserving AppX deployment of resolved dependencies. Add UAP payload and dependency regression coverage.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@github-actions github-actions Bot added the state/needs-review Awaiting review from the team. label Nov 6, 2026
@microsoft-github-policy-service microsoft-github-policy-service Bot added state/needs-review Awaiting review from the team. and removed state/needs-review Awaiting review from the team. labels Nov 6, 2026
@github-actions github-actions Bot added state/approved Proposal approved; ready for implementation. and removed state/needs-review Awaiting review from the team. labels Nov 6, 2026
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@github-actions github-actions Bot added state/approved Proposal approved; ready for implementation. and removed state/approved Proposal approved; ready for implementation. labels Nov 6, 2026
@Evangelink
Amaury Levé (Evangelink) merged commit 75ba0fc into microsoft:rel/4.5 Nov 6, 2026
8 checks passed
@github-actions github-actions Bot removed the state/approved Proposal approved; ready for implementation. label Nov 6, 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