Closed
Description
Our CI is using code coverage on .NET SDK 3.0.100.
When trying to update to SDK to 5.0.301 the instrumentation fails:
C:\Users\kirill\.nuget\packages\coverlet.msbuild\2.6.3\build\coverlet.msbuild.targets(7,5): [coverlet] Unable to instrument module: C:\.....\Release\net472\.......dll because : The type initializer for 'Coverlet.Core.Instrumentation.NetstandardAwareAssemblyResolver' threw an exception.
From looking at the static constructor, it only catches the FileNotFoundException:
coverlet/src/coverlet.core/Instrumentation/CecilAssemblyResolver.cs
Lines 49 to 64 in 7221afe
I think the Instrumenter should be trying to unwrap the exception before reporting it: