You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One of the problems with such a cache is that when reusing a dll from the cache that was previously compiled in a different location, its debug symbols contain absolute paths to the source files from that original compilation and will not be compatible with any other location.
I managed to use Mono.Cecil to rewrite all document URLs in all the methods found, to make the dll/pdb compatible (and it works).
However, I can see that roundtripping the whole module with Mono.Cecil has side effects, ie. a simple var m = ModuleDefinition.ReadModule(...); m.Write() does not yield an identical result.
I'm assuming that that is somewhat expected and hard to avoid.
(or maybe it isn't and I'm using the API wrong?)
Therefore I'm wondering if there is a less intrusive way to modify just the document URLs in the symbols of a module, that would guarantee that everything else stays untouched.
I'm sure this can be done by low-level modifications of the dll/pdb files - after all it's almost a "find & replace".
Is there a high-level API to achieve this though?
I'm interested in "portable" and "embedded [portable]" PDBs.
The text was updated successfully, but these errors were encountered:
Hi,
I'm trying to use Mono.Cecil to help implement a compilation cache: https://github.com/safesparrow/MSBuild.CompilerCache/
One of the problems with such a cache is that when reusing a dll from the cache that was previously compiled in a different location, its debug symbols contain absolute paths to the source files from that original compilation and will not be compatible with any other location.
I managed to use Mono.Cecil to rewrite all document URLs in all the methods found, to make the dll/pdb compatible (and it works).
However, I can see that roundtripping the whole module with Mono.Cecil has side effects, ie. a simple
var m = ModuleDefinition.ReadModule(...); m.Write()
does not yield an identical result.I'm assuming that that is somewhat expected and hard to avoid.
(or maybe it isn't and I'm using the API wrong?)
Therefore I'm wondering if there is a less intrusive way to modify just the document URLs in the symbols of a module, that would guarantee that everything else stays untouched.
I'm sure this can be done by low-level modifications of the dll/pdb files - after all it's almost a "find & replace".
Is there a high-level API to achieve this though?
I'm interested in "portable" and "embedded [portable]" PDBs.
The text was updated successfully, but these errors were encountered: