Skip to content

Getting started

Andreas Weizel edited this page Jul 3, 2024 · 4 revisions

Installation

Install ILSpy extension from Visual Studio Marketplace. On installation Visual Studio Code might ask to additionally install .NET Install Tool for Extension Authors, which is by design and intended.

On first start a .NET runtime is automatically downloaded in the background. This is necessary to access ILSpy decompilation engine.

Download of .NET Runtime

The runtime is installed into a local VS Code directory and doesn't alter your system. There is one exception: On Linux systems this process might also install some dependencies of the runtime, which could involve adding/updating some packages.

Usage

After successful start you will see new "ILSpy" commands in VS Code's Command Palette (Ctrl+Shift+P):

ILSpy in Command Palette

You can either select an assembly file present in your workspace or choose any assembly file on your system. After selection the assembly will be shown in a new Explorer view "ILSpy: Assemblies":

Assembly Tree

The tree view allows to explore the namespaces, members and types of the assembly. Click on an item will decompile the member on-demand and show it's C# or MSIL code in an editor view.

Choosing Output Language

You may choose different output languages for decompilation output, either different generations of C#, or direct IL code.

With an active decompilation view click the output language button in status bar:

Output Language Status Bar Button

Then a list of available languages and language generations opens. Choose the one you like, the active decompilation view updates immediately.

Output Language List

Output language can also be changed globally in VS Code settings:

Output Language Setting

Clone this wiki locally