Closed rgroenewoudt closed 9 months ago
Hi,
as far as I remember, this is related to PDB format. You can change it in build properties. Another PDB format may work. Sorry for blurry answer. Let me know!
Well, the results are interesting. I've tried the DebugType options
My guess is that MrAdvice corrupts the new portable pdb in a rare case.
If I try the tool sourcelink with command sourcelink print-urls pdb-file
, it works for other projects but fails with error "Read out of bounds." for the specific project. I'm cannot find any other tools to validate the portable-pdb-format.
MrAdvice is based on dnlib (https://github.com/0xd4d/dnlib) wich does the dirty work with PDB, so unfortunately this is not something I am comfortable with. If one day there is something similar directly in dotnet, it may be worth trying to port it.
Well, good news. I just spent 10 minutes updating dnlib to latest nuget (previous version was from 2020) in the Stitcherboy project and put the binaries in MrAdvice locally and debugging now works 👍
I can make a PR for you in https://github.com/picrap/StitcherBoy.
That would be great! I’ll update MrAdvice after this. Thank you.
MrAdvice 2.15 is out! Let me know.
Confirmed, the problem is fixed
We are running into a rare issue. We are using MrAdvice in our large solution in most projects but in 1 or 2 projects, the .pdb file fails to load while debugging in Visual Studio.
The Modules-windows in VS simply shows that PDB is not loaded and it fails loading it:
Unexpected error opening PDB file. The file may be corrupt.
When MrAdvice nuget package is removed, it works again. Other similar projects always work.The same issue occurs on my colleague's computers.
Things I've tried that make no difference:
Comparing the DLLs in DotPeek with/without MrAdvice doesn't indicate anything. The one thing that is interesting is that System.Runtime shows up twice, 6.0.0.0 and 8.0.0.0 (we are using .NET 8) but this happens in all DLLs with MrAdvice.
I cannot reproduce this in a new project.
Do you have any suggestions on how to debug this? I can build MrAdvice locally and try out different things.
Running on: