Repository navigation
Enhance .NET Framework assembly resolution on Windows - #1980
Merged
Merged
Conversation
Add TryWithNetFrameworkReferenceAssemblyResolver to CecilAssemblyResolver, enabling resolution of assemblies from .NET Framework reference directories and the GAC on Windows. This method is now prioritized in the fallback chain, with supporting helpers for directory and GAC traversal, improving robustness for .NET Framework scenarios.
This was referenced Sep 27, 2026
Closed
Merged
This was referenced Nov 18, 2026
Bump coverlet.collector from 6.0.4 to 10.1.1
Andrew543210/dotnet-react-sharpmind-learningplatform#10
Open
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.
Add TryWithNetFrameworkReferenceAssemblyResolver to CecilAssemblyResolver, enabling resolution of assemblies from .NET Framework reference directories and the GAC on Windows. This method is now prioritized in the fallback chain, with supporting helpers for directory and GAC traversal, improving robustness for .NET Framework scenarios.
Implemented and validated a resolver-focused fix for #1965.
What changed
In NetstandardAwareAssemblyResolver (src/coverlet.core/Instrumentation/CecilAssemblyResolver.cs), I added a .NET Framework-specific fallback on Windows:
• probe .NET Framework Reference Assemblies (Reference Assemblies\Microsoft\Framework.NETFramework\v*)
• probe GAC locations (Microsoft.NET\assembly\GAC_MSIL/GAC_32/GAC_64, plus legacy Windows\assembly\GAC_MSIL)
• updated resolve order to try framework/runtime probing before the deps-based custom resolver
Result
WindowsBase now resolves in the repro, so preflight no longer fails with UnresolvableDependencies and instrumentation continues for the net481 module.
Validation
Confirmed with repro project C:\GitHub\coverlet-issue-1965: the previous unresolved WindowsBase warning is gone and coverage generation proceeds.