Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chapter 07. Decompiling using the ILSpy extension for Visual Studio Code #86

Open
Dreamoochy opened this issue Jun 24, 2022 · 3 comments

Comments

@Dreamoochy
Copy link

  1. I don't have two tabs with C# and IL. It is possible to split editor and get two tabs of the decompiled assembly, but they are synchronized. I.e. if I change lang view from C# to IL, both views are switched to IL.
  2. There's no .module extern libSystem.Native text in the decompiled IL.
  3. Decompiled assembly tree has way less nodes:
v System.IO.FileSystem
  v {}
    v <Module>

So it is impossible to perform steps 9, 10, 11.

Maybe it's because my ilspy-vscode extension is v0.13.1 while the one in the book is 0.9.0. Something might have changed. And/or some additional configuring is required.

I work with Win 11 21H2, VSCodium v1.68.1, ilspy-vscode v0.13.1, .NET SDK v6.0.301

@markjprice
Copy link
Owner

markjprice commented Jun 24, 2022

Yes, it looks like that extension has been changed. You could go to the extension and click Uninstall | Install Another Version... and then select 0.11.2 which is the newest version that shows two edit windows side-by-side as shown in the book. Then you can upgrade back to 13.x afterwards.

image

image

But that still doesn't show the classes so it's probably not worth it.

@markjprice
Copy link
Owner

markjprice commented Jun 24, 2022

In the next edition, I will tell the reader to open a different assembly so it works with the latest version of ILSpy. Probably the System.Linq assembly and decompile the Enumerable class and its Average method for a sequence of int values:

image

And then show how to toggle between C# and IL code by clicking Output Language:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants