7

I had the weirdest thing with the dotpeek product.

I've opened an old dll version from a local folder and saw in the dotpeek some code that was added to a newer version. after about a day of investigation the disassemble showed me the older code.

can someone explain to me how it can be done and how to avoid it in the future. the only explanation that I could think of is that the newer version was loaded to the GAC (global assembly cache).

anyone encountered this issue and knows how to solve it?

silver
  • 1,633
  • 1
  • 20
  • 32
  • Same issue, 4 years later. It appears to be a bug in DotPeek. I have tried everything I can think of to get it to "forget" prior versions, from renaming the DLL to changing the version number, etc. Nothing works. (And none of the answers below are helpful). Once it has decompiled an assembly, if it sees another with the same Assembly name it appears to cling to the old one for dear life. – Emperor Eto Feb 23 '21 at 13:50

2 Answers2

3

There is an option to "Use debug information for navigation". If set, dotPeek will try to use the source file information from .pdb files, and display the actual source for the class, instead of decompiling. It might be that dotPeek is showing the source file, but the file has changed since the .dll was last compiled. Clearing this checkbox means dotPeek will always decompile.

There's an issue (DOTP-7375) raised to use better wording for the option, so it's obvious what dotPeek is doing. And I've just raised another issue (DOTP-7376) to make sure that dotPeek also verifies the source file's checksum with the one in the .pdb so that it doesn't show out-of-date/newer source files.

citizenmatt
  • 18,085
  • 5
  • 55
  • 60
  • I believe that my issue is like described in the issue (DOTP-7376) that you've opened (should entitle me with at least +1 for my question). I think that you also should consider to change the default state of this check box... – silver Sep 19 '16 at 10:56
1

make sure that you delete the local source files.

when the local source file doesn't exist the dotpeek will be forced to decompile it.