Fix SCI binding failure in DTA hosts (rel/18.7)#15723
Open
nohwnd wants to merge 6 commits intomicrosoft:rel/18.7from
Open
Fix SCI binding failure in DTA hosts (rel/18.7)#15723nohwnd wants to merge 6 commits intomicrosoft:rel/18.7from
nohwnd wants to merge 6 commits intomicrosoft:rel/18.7from
Conversation
Member
Author
|
wait we need to ship nestanardd, fixing |
Force .NET Framework product projects to compile against the netstandard2.0 build of System.Collections.Immutable (AssemblyVersion 9.0.0.0) instead of the net462 build (AssemblyVersion 9.0.0.11). SCI 9.0.11 introduced an AV divergence between the two TFMs; the nupkg ships the netstandard2.0 DLL, so compiled metadata must reference 9.0.0.0 for consumers without binding redirects (e.g. Azure DevOps Distributed Test Agent) to avoid FileLoadException. - Directory.Build.targets: ExcludeAssets=compile on SCI PackageReference + explicit Reference to netstandard2.0 DLL for .NET Framework product projects - Extend binding redirect oldVersion to cover 9.0.0.11 - Add DtaLikeHost test asset and acceptance test Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
c301be6 to
6756070
Compare
Add explicit System.Collections.Immutable PackageReference to CoreUtilities and ObjectModel for non-.NETCoreApp targets. This ensures product assemblies compile against SCI 9.0.0.0, matching the shipped DLL. Extend SCI binding redirect to cover net462 AV 9.0.0.11. Suppress MSB3277 for .NETCoreApp targets. Fix MSBuildWarningsAsMessages inheritance in packaging projects. Fix corrupted XML in app.config files (missing space). Remove old DtaLikeHost test asset, replace with nupkg-layout test. Fixes microsoft#15718 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The previous condition '!= .NETCoreApp' included netstandard2.0, which made netstandard2.0 assemblies reference SCI 9.0.0.0. This breaks on .NET 8 where the shared framework only has SCI 8.0.0.0. Change to '== .NETFramework' so only net462 builds get the explicit SCI reference (covered by binding redirects), while netstandard2.0 keeps SCI 8.0.0.0 from the SRM transitive dependency. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The DTA scenario (loading SCI without binding redirects) cannot be fully fixed with SCI 9.0.11 due to assembly version divergence between net462 (9.0.0.11) and netstandard2.0 (9.0.0.0). This will be tracked in a separate issue. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
SCI 9.0.11 has different assembly versions for net462 (9.0.0.11) vs netstandard2.0 (9.0.0.0). DTA hosts without binding redirects need exact version match. SCI 10.0.0 has AV 10.0.0.0 for all TFMs. - Bump SystemCollectionsImmutableVersion to 10.0.0 - Update binding redirects to 10.0.0.0 - Restore DTA acceptance test with correct DLL name Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
SCI 10.0.0 introduces a transitive dependency on System.Memory for net462. In Release builds, the shipped System.Memory.dll has assembly version 4.0.5.0, but the MSTest adapter loads against 4.0.1.2. Without a binding redirect in testhost.x86.exe.config and datacollector.exe.config, the CLR cannot resolve the version mismatch, causing FileNotFoundException in integration tests. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
Fix DTA hosts crashing with
FileLoadExceptiononSystem.Collections.Immutable 8.0.0.0.Same fix as #15724 (main), ported to rel/18.7.
Changes
MSBuildWarningsAsMessagesinheritance in packaging projects.Fixes #15718
Related PRs: #15724 (main), #15722 (rel/18.6)