Remove DiagnosticSource binding redirect (rel/18.6)#15776
Merged
Conversation
The binding redirect for System.Diagnostics.DiagnosticSource (8.0.0.1) was added in microsoft#15567 but the DLL is excluded from the CLI package during packaging. The redirect points to a version that doesn't ship, causing MissingMethodException on net462 with DisableAppDomain=true when a test triggers assembly resolution for DiagnosticSource. Fixes microsoft#15765 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This was referenced May 14, 2026
…soft#15778) * Error on binding redirects pointing to missing DLLs Change verify-binding-redirects.ps1 to fail when a binding redirect references a DLL that isn't in the package layout. Previously this was silently skipped, which allowed microsoft#15765 — a redirect for DiagnosticSource 8.0.0.1 shipped in the config but the DLL was excluded from the package. The whole-package-missing case (VMR) is still a skip. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Remove stale DiagnosticSource and Encodings.Web redirects from vstest.console The hardened validation script caught two more orphaned binding redirects in vstest.console/app.config — both DLLs are explicitly excluded from the CLI package nuspec. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix review feedback: fail locally on missing-DLL errors - Missing-DLL errors now Write-Error instead of reporting success - CI message distinguishes version mismatches (auto-fixable) from missing-DLL errors (manual removal needed) - Addresses Copilot review comments on lines 133 and 138 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix em-dash encoding in verify-binding-redirects.ps1 Replace Unicode em-dash (U+2014) with ASCII hyphen in comments and strings. The em-dash gets corrupted to multi-byte garbage on CI's PowerShell, causing a parse error that breaks the entire validation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Remove FileSystemGlobbing from allow-list It ships in the package, so allowing it would mask a future packaging regression. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2043de9 to
4ace679
Compare
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.
Remove the
System.Diagnostics.DiagnosticSourcebinding redirect from testhost, datacollector, and vstest.console app.configs.The redirect (added in #15567) points to assembly version 8.0.0.1, but the DLL is excluded from the CLI package in the
.nuspec. On net462 withDisableAppDomain=true, the testhost's redirect is active in the test AppDomain — it rewrites DiagnosticSource requests to 8.0.0.1, which doesn't exist, causingMissingMethodExceptionin the assembly resolver.Fixes #15765