Competition: What’s your favorite Redgate tool? Enter now.

Cannot Go to Decompiled Definition (VS 2019)

The "Go to Decompiled Definition" feature doews not work with my Visual Studio 2019 Professional installation. Reflector version is 10.2.0.1752.
Tagged:

Answers

  • Hi @rjdunnill,

    We've had some confusion on this in the past so I'll elaborate on how it should work as it may be working as intended and just not indicating so.  There is an open internal issue RP-4194 regarding how best to present this as there have been competing feedback from users.

    Shift+Alt+G will never decompile code. It will only jump to code which was cached before. If the cache doesn't exist, it will do nothing. Only F12 will decompile the code when it isn't found in the cache. There are a couple of ways to fill the cache.

    GotoDefinition (F12)

    This option only works when the .NET Reflector => GotoDefinition checkbox is enabled. It only works when one of the following events are executed (.NET Reflector hijacks them):
    • Edit.GoToDefinition,
    • ReSharper.ReSharper_GotoDeclaration,
    • EditorContextMenus.CodeWindow.ReSharper_GotoDeclarationInContextMenu.

    It doesn't have to be F12, but it has to be one of the events above. As opposed to Shift+Alt+G, it will work in user code (even when it was never compiled).

    When successfully executed, it will try to jump to code that was decompiled before (using the cache). If the assembly wasn't decompiled before, a dynamic decompilation will start decompiling the assembly. Once finished, it will be saved to the cache (so Shift+Alt+G will work later), and lastly, it will jump to the decompiled code.

    Go To Decompiled Definition (Shift+Alt+G)

    This option will not decompile code. It will only jump to code if it was decompiled before (and exists in a cache). If there's no decompiled code in the cache, it will do nothing.

    Also, it will not work for user code. It only works in files generated by .NET Reflector.

    Dynamic decompilation

    Code will only ever be decompiled (and saved to the cache for use with Shift+Alt+G) when:
    • Clicking F12 (or equivalent context menu item),
    • Generating PDB (.NET Reflector => Generate PDB),
    • Debugging an executable (.NET Reflector => Debug an executable),
    • Decompiled from Call Stack (when .NET Reflector => Decompile from Call Stack is enabled),
    • Clicking "Go to Definition" context menu item inside ".NET Reflector Object Browser" tool window.
    I hope that helps clarify how it should work.  If you still see that it is not behaving correctly according to this outlined behavior then please do let me know and describe further the scenario in which it is not working for you.

    Kind regards,
    Alex
    Product Support Engineer | Redgate Software

    Have you visited our Help Center?
Sign In or Register to comment.