Repository navigation
Simplify the MSTest.TestAdapter UWP package layout #12615
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Amaury Levé (Evangelink)
merged 4 commits into
main
from
dev/amauryleve/adapter-lib-layout-simplify
Nov 25, 2026
Merged
Changes from 1 commit
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
26ece8e
Ship classic UWP adapter from lib and flatten net10 UI payload
Evangelink 219b468
Fix adapter decision record markdown lint
Evangelink b590f31
Preserve non-SDK UWP adapter asset policy
Evangelink 7402e69
Include adapter asset policy in native Bazel packages
Evangelink File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1327,7 +1327,7 @@ | |
| | Package | Ordinary assets | UI payload (not in `lib`) | Selected by | | ||
| | --- | --- | --- | --- | | ||
| | `MSTest.TestFramework` | `lib/{net462,netstandard2.0,net10.0,net11.0,uap10.0.16299}` | `buildTransitive/net10.0/{uwp,winui}/` (`MSTest.Uwp.dll`, `MSTest.WinUI.dll` with xml, pri and WinUI satellites) | Modern UI projects get compile and runtime assets according to the resolved core framework assets. For classic UWP, NuGet selects `lib/uap10.0.16299` directly. | | ||
| | `MSTest.TestAdapter` | `lib/{net462,net10.0,net11.0}` | `buildTransitive/net10.0/ui/` (UI adapter and platform services); `buildTransitive/uap10.0/` (classic UWP adapter, platform services and `_localization` satellites) | `_MSTestComputeUIAdapterSelection` decides; `_MSTestSelectUIAdapterAssets` then swaps the resolved `lib/net10.0` adapter DLLs for the `ui/` build in place after `ResolvePackageAssets` (and the publish equivalent); classic UWP references the `uap10.0` payload directly | | ||
| | `MSTest.TestAdapter` | `lib/{net462,net10.0,net11.0,uap10.0.16299}` | `buildTransitive/net10.0/` (UI adapter and platform services) | `_MSTestComputeUIAdapterSelection` decides; `_MSTestSelectUIAdapterAssets` then swaps the resolved `lib/net10.0` adapter DLLs for the `buildTransitive/net10.0` build in place after `ResolvePackageAssets` (and the publish equivalent); for classic UWP, NuGet selects `lib/uap10.0.16299` directly (see [classic UWP lib layout](#classic-uwp-adapter-in-lib-and-flat-ui-payload)) | | ||
|
|
||
| Classic UWP has a distinct TFM. Its `lib` group includes `MSTest.Uwp` alongside | ||
| the same core framework, type forwarders and satellites as `lib/netstandard2.0`: | ||
|
|
@@ -1648,3 +1648,68 @@ | |
| build/publish probes, not an additional native activation case. Linux/Bazel | ||
| packs and unrelated application-model cases were not rerun. These local | ||
| results do not replace fresh blocking CI checks on the published head. | ||
|
|
||
| ## Classic UWP adapter in lib and flat UI payload | ||
|
|
||
| Date: 2026-11-24 | ||
|
|
||
| ### Request | ||
|
|
||
| The maintainer asked to drop the `ui` subfolder from the net10 Windows UI | ||
| adapter payload, and to ship the classic UWP adapter directly from `lib` | ||
| because `uap10.0` is a real NuGet TFM. | ||
|
|
||
| ### Decision | ||
|
|
||
| - The Windows-specific UWP/WinUI adapter build moves from | ||
| `buildTransitive/net10.0/ui/` to `buildTransitive/net10.0/`. The | ||
| portable net10 adapter stays in `lib/net10.0`, so these two builds do not | ||
| collide. `buildTransitive/common/MSTest.TestAdapter.targets` selects the | ||
| flat path through `_MSTestUIAdapterRoot`. | ||
| - The classic UWP adapter DLLs and satellites move from the | ||
| `buildTransitive/uap10.0` payload to `lib/uap10.0.16299/`, matching | ||
| `MSTest.TestFramework`. Only the props, targets and `Parallelize.targets` | ||
| remain under `buildTransitive/uap10.0/`. | ||
| - The UWP targets drop their explicit `Reference`/`HintPath` items. The | ||
| `_AddMSTestUwpRuntimeDependencies` AppX `Content` items still deploy the | ||
| adapter DLLs, because SDK-style classic UWP projects do not copy NuGet | ||
| runtime assets into the AppX layout. Satellite globs read | ||
| `lib/uap10.0.16299/<culture>/`, so the existing culture policy is | ||
| unchanged. | ||
|
|
||
| ### Consequences | ||
|
|
||
| - NuGet now produces a `uap10.0.16299` `<references>` group with | ||
| `MSTest.TestAdapter.dll` and `MSTestAdapter.PlatformServices.dll`. Classic | ||
| UWP projects therefore get a compile reference to the adapter, as net462 | ||
| and net10 consumers already do. Adapter types are mostly internal, so this | ||
| was accepted for consistency. Previously the adapter used a | ||
| `Private=false` reference with no compile surface. | ||
| - Alternative considered: keep the classic UWP DLLs in a `buildTransitive` | ||
| payload or keep satellites under `_localization`. It was rejected because | ||
| it keeps a parallel, nonstandard asset location for a TFM that NuGet | ||
| already understands. | ||
|
|
||
| ### Validation | ||
|
|
||
| - `.\build.cmd -pack` and `.\eng\verify-nupkgs.ps1 -configuration Debug | ||
| -updateBaselines`: only `eng/package-shapes/MSTest.TestAdapter.txt` | ||
| changed. | ||
| - MSTest acceptance tests run with `TESTFX_RUN_WINDOWS_APP_MODEL_TESTS=1`: | ||
| `WindowsApplicationModelPackageTests`, `CoreFrameworkAssemblyTests`, | ||
| `ClassicUwpTests` and `SdkTests` (including the classic UWP, Modern UWP | ||
| and WinUI composition and satellite cases): 191 passed, 0 failed, including | ||
| end-to-end classic UWP MTP runs for the `MSTest`, `MSTest.Sdk` and | ||
| `MSTest.TestAdapter` consumers and classic UWP satellite filtering. | ||
| - MTP `PackagedWinUITests` built the WinUI consumers against the flat | ||
| payload but could not run locally: the native cases need | ||
| `TESTFX_DOTNET_10_PATH`, and the controller cases failed to load | ||
| `Microsoft.CodeCoverage.Instrumentation.Core` from the unchanged | ||
| `Microsoft.Testing.Extensions.PackagedApp.MSBuild` controller layout. | ||
| CI must cover them. | ||
|
|
||
| ### Gap | ||
|
|
||
| Non-SDK (`packages.config`) classic UWP projects were not exercised. They | ||
| may receive adapter satellites from both NuGet and the culture-policy | ||
| `Content` items. | ||
|
Check failure on line 1715 in docs/decisions/mstest-adapter-lib-assets.md
|
||
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
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
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
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
7 changes: 3 additions & 4 deletions
7
src/MSTest/MSTest.TestAdapter/buildTransitive/uwp/MSTest.TestAdapter.props
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.