Remove stale Microsoft.Extensions.FileSystemGlobbing binding redirect from testhost.x86 and datacollector - #16082
Merged
Amaury Levé (Evangelink) merged 1 commit intoJun 2, 2026
Conversation
testhost.x86 and datacollector neither reference Microsoft.Extensions.FileSystemGlobbing nor ship the DLL beside their EXE in the Microsoft.TestPlatform.CLI nupkg (TestHostNetFramework folder). The stale redirect is the same anti-pattern fixed for DiagnosticSource in microsoft#15776: a redirect to an assembly that isn't shipped can cause MissingMethodException on net462 with DisableAppDomain=true. Only vstest.console references the assembly (via FilePatternParser), so the redirect is kept in src/vstest.console/app.config where the DLL ships next to vstest.console.dll. This is also the latent issue surfaced by the hardened verifier added in microsoft#15778 - currently visible on the rel/18.6 VMR build because (1) Microsoft.TestPlatform.nupkg (which ships the EXEs together with FileSystemGlobbing.dll under tools/net462/Common7/IDE/Extensions/TestPlatform/) is gated off when DotNetBuild=true, leaving the verifier to look only inside Microsoft.TestPlatform.CLI's TestHostNetFramework folder; and (2) the DotNetBuild != 'true' skip on _VerifyNuGetPackages was not backported to rel/18.6. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Removes a stale Microsoft.Extensions.FileSystemGlobbing binding redirect from the .NET Framework testhost.x86 and datacollector app.configs, aligning binding redirects with the assemblies these executables actually ship alongside and preventing validation failures when the target DLL is absent.
Changes:
- Removed
Microsoft.Extensions.FileSystemGlobbing<dependentAssembly>binding redirects fromsrc/testhost.x86/app.configandsrc/datacollector/app.config. - Kept
vstest.consolebehavior unchanged (no redirect removal there in this PR).
Show a summary per file
| File | Description |
|---|---|
| src/testhost.x86/app.config | Drops the stale Microsoft.Extensions.FileSystemGlobbing bindingRedirect from testhost.x86 configuration. |
| src/datacollector/app.config | Drops the stale Microsoft.Extensions.FileSystemGlobbing bindingRedirect from datacollector configuration. |
Copilot's findings
- Files reviewed: 2/2 changed files
- Comments generated: 0
Amaury Levé (Evangelink)
enabled auto-merge (squash)
June 2, 2026 09:45
This was referenced Jun 2, 2026
Amaury Levé (Evangelink)
added a commit
that referenced
this pull request
Jun 2, 2026
…ng redirect (#16084) Cherry-pick of the main fix (PR #16082) for consistency with rel/18.6. testhost.x86 and datacollector neither reference Microsoft.Extensions.FileSystemGlobbing nor ship the DLL beside their EXE in the Microsoft.TestPlatform.CLI nupkg (TestHostNetFramework folder). Same anti-pattern as the DiagnosticSource fix (#15776). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Amaury Levé (Evangelink)
added a commit
that referenced
this pull request
Jun 2, 2026
…ng redirect (#16083) Cherry-pick of the main fix (PR #16082) to unblock the rel/18.6 VMR build. testhost.x86 and datacollector neither reference Microsoft.Extensions.FileSystemGlobbing nor ship the DLL beside their EXE in the Microsoft.TestPlatform.CLI nupkg (TestHostNetFramework folder). Same anti-pattern as the DiagnosticSource fix (#15776). On main and rel/18.8 the _VerifyNuGetPackages target is skipped under DotNetBuild=true, so the latent issue is masked in the VMR. On rel/18.6 that skip is not present, so the hardened verifier (from #15778) running in the VMR pack catches the stale redirect and fails the build. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Jan Krivanek (JanKrivanek)
approved these changes
Jun 2, 2026
Amaury Levé (Evangelink)
deleted the
dev/amauryleve/remove-stale-filesystemglobbing-redirect
branch
June 3, 2026 14:18
This was referenced Jun 23, 2026
This was referenced Aug 14, 2026
Bump Microsoft.NET.Test.Sdk from 18.6.0 to 18.9.0
Analogy-LogViewer/Analogy.LogViewer.JsonParser#264
Open
This was referenced Aug 15, 2026
Open
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.
What
Remove the stale
Microsoft.Extensions.FileSystemGlobbing<bindingRedirect>fromsrc/testhost.x86/app.configandsrc/datacollector/app.config. The redirect is kept insrc/vstest.console/app.config(the only EXE that legitimately ships and uses the assembly, viaFilePatternParser).Why
Neither
testhost.x86.exenordatacollector.exereferencesMicrosoft.Extensions.FileSystemGlobbing, and the DLL doesn't ship beside them in theMicrosoft.TestPlatform.CLInupkg'scontentFiles/any/net10.0/TestHostNetFramework/folder. A binding redirect pointing to a DLL that isn't on the probing path is the same anti-pattern fixed forSystem.Diagnostics.DiagnosticSourcein #15776 (root cause of #15765 —MissingMethodExceptionon net462 withDisableAppDomain=true).How it was discovered
This is the latent issue the hardened verifier from #15778 catches. The failure currently surfaces only on the rel/18.6 VMR build:
Microsoft.TestPlatform.csprojgatesIsPackableon'$(DotNetBuild)' != 'true'(the package "relies on a VS license"), so in VMR mode it isn't produced. That nupkg is the one that shipstesthost.x86.exe/datacollector.exeintools/net462/Common7/IDE/Extensions/TestPlatform/withMicrosoft.Extensions.FileSystemGlobbing.dllright next to them — which is what masks the stale redirect in vstest's normal pipeline (Find-ExeInPackagesprefers non-TestHostNetFrameworklayouts).Microsoft.TestPlatform.CLI'sTestHostNetFramework/folder, where the DLL isn't shipped → error.DotNetBuild != 'true'skip on_VerifyNuGetPackages(commit 37087fc) is on main and rel/18.8 but not backported to rel/18.6 or rel/18.7, so the verifier still runs in the VMR pack on those branches.This PR fixes the underlying issue. It should be cherry-picked to rel/18.6 (where it actively unblocks the VMR build) and rel/18.7 for consistency.