I’m writing some logic for academic purposes symbol source server.
I have to check assembly and its pdb file if they match each other so users could use them without any problems.
I’ve made little research, but without anything spectacular. If VS will get wrong symbols debugging it might show information:
The following module was built either
with optimizations enabled or without
debug information:
assembly.dll
To
debug this module, change its project
build configuration to Debug mode. To
suppress this message, disable the
‘Warn if no user code on launch’
debugger option.
I’m also wondering what information VS gets from pdb and assembly to validate them.
Is there any (managed) API? Or even unmanaged?
Any ideas?
I think the name of the API Visual Studio uses is DIA; it’s a COM API that you can call from C#.
The Mono.Cecil library provides a nice set of classes for accessing assemblies and their symbols; it uses DIA underneath for .pdb files. I would call Cecil directly for this; if not, the source code should provide a guide.