chore: Fix benchmark TestAdapter related issues #2766
Merged
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.
This PR intended to fix
BenchmarkDotNet.TestAdapterrelated issues.What's changed in this PR
System.Collections.Immutablebaseline version from9.0.3->9.0.0and modify related benchmark.AppDomain.CurrentDomain.AssemblyResolverfor .NET 4.6.2 on TestAdapter project to fix assembly loading issue.System.Memory(Use transitively referenced package version instead)Background
System.Collections.Immutableis transitively referenced by other packages.And it cause version conflicts when using TestAdapter. So it need to adjust minimum version to other packages.
(Normally it's not cause issue Because newer version is loaded first. But when running with TestAdapter. It seems
9.0.0version is loaded and cause conflicts)And when using TestAdapter on .NET 4.6.2.
It failed to load
BenchmarkDotNet.dll.So I've added custom AssemblyResolve for net462.
I've confirmed this issue on following condigitons.