dotpeek showing code from different version
Asked Answered
P

3

8

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?

Persevere answered 18/9, 2016 at 12:47 Comment(1)
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.Americaamerican
E
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.

Epistasis answered 21/9, 2016 at 6:14 Comment(0)
T
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.

Tavares answered 19/9, 2016 at 10:40 Comment(1)
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...Persevere
E
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.

Epistasis answered 21/9, 2016 at 6:14 Comment(0)
C
0

Per the documentation: https://www.jetbrains.com/help/decompiler/Opening_Assembly_Files.html

To get rid of dotPeek's aggressive caching and force a refresh from the latest file, delete the content of %LOCALAPPDATA%\JetBrains\Shared\vAny\DecompilerCache

Coulter answered 16/9, 2023 at 23:20 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.