-
Notifications
You must be signed in to change notification settings - Fork 388
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Need better diagnosability if NetstandardAwareAssemblyResolver throws #1196
Comments
I'm guessing it should be calling ToString() instead of the message, and possibly report the InnerException(s) recursively. Otherwise it's really hard to diagnose what is going on. |
Also perhaps it should be an error, not a warning? |
I had to debug using VS Child Process Attach extension, and enable first-chance exceptions to see what's going on. Turns out it was a bug where Mono.Cecil was bringing the wrong version of System.IO.FileSystem.Primitives.dll: I had to update coverlet.msbuild from Long story short, this would have been easier to investigate if the Instrumenter line 126 printed the entire exception instead of just the message. I'd immediately see that it's a MissingMethodException: |
Thx a lot for looking into this! |
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:
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:
coverlet/src/coverlet.core/Instrumentation/Instrumenter.cs
Line 126 in 8a59bd5
The text was updated successfully, but these errors were encountered: