Guide · Open source
How to use ILSpy: open, decompile and browse .NET assemblies
Updated · written with AI from the project's own documentation and checked against our catalogue data
ILSpy is an open-source .NET decompiler and assembly browser. It opens compiled .NET programs and libraries and converts them back into readable C# so you can see how they work without the original source code. This guide explains what ILSpy does, how to get it running, and how to use its main features to explore an assembly.
Quick start
- 1Get ILSpy. Download the latest release from the project's Releases page, or build the desktop UI from source using the commands in the README.
- 2Start the application. Launch ILSpy on Windows, Linux or macOS. The desktop interface is built with Avalonia.
- 3Open an assembly. Open the compiled .NET assembly you want to inspect from disk. You can also open one from a NuGet feed.
- 4Browse types and methods. Expand the assembly tree and select a type or method to view its decompiled C# code.
- 5Search and follow references. Use search to find types, methods or properties, and click references to navigate to their definitions.
- 6Inspect metadata. Open the assembly metadata explorer to look at the metadata inside the assembly.
What ILSpy does and what it is for
ILSpy takes a compiled .NET assembly and turns it back into readable C#. It also lets you browse the assembly's types, methods, and metadata. This is useful when you need to understand a .NET library whose source code you do not have, such as a third-party package or a NuGet dependency you are debugging.
The desktop interface is built with Avalonia and runs on Windows, Linux, and macOS. ILSpy is distributed under the MIT License.
Download ILSpy or build it from source
The simplest route is to download a release from the project's Releases page. The project also publishes a CI build from the master branch, and the Microsoft Store lists RTM versions only.
If you want to build the desktop UI yourself, the README lists these steps: clone the repository, initialise its submodules, then build the cross-platform desktop project. On Unix and macOS, you also need the .NET SDKs named in the README, and PowerShell.
- Clone the repository with git.
- Initialise submodules, which download the ILSpy-Tests submodule used by some test cases.
- Build the cross-platform Avalonia desktop UI with the Desktop solution filter.
- Run it with dotnet run --project ILSpy.
git clone https://github.com/icsharpcode/ILSpy
git submodule update --init --recursive
dotnet build ILSpy.Desktop.slnfOpen an assembly and read its decompiled C#
Open a .NET assembly from disk in the ILSpy window. ILSpy shows the assembly's namespaces and types in a tree. Select a type or method to view its decompiled C# in the main pane.
ILSpy can also open assemblies from a NuGet feed. Opening from a running process and from the GAC are Windows-only features, according to the README.
- Decompilation to C#, including whole-project decompilation.
- Hyperlink-based navigation between types, methods and properties.
- Base and derived type navigation, with history.
- Bookmarks for places you want to return to.
Search and navigate large assemblies
Use the search feature to find types, methods and properties by name. The project documents search options on its wiki, which you can consult for matching rules.
When you follow a type, method or property reference in the code, ILSpy lets you jump to its definition. Combined with base and derived type navigation and history, this makes it practical to trace how a library is put together.
Inspect metadata and special binary formats
The assembly metadata explorer lets you look at the metadata inside an assembly, beyond the decompiled code. The project has a feature walkthrough for it on its wiki.
ILSpy also includes a BAML to XAML decompiler and support for ReadyToRun binaries for .NET Core. It supports PDB generation, according to the project description.
- Assembly metadata explorer.
- BAML to XAML decompiler and !AvaloniaResources support.
- ReadyToRun binary support for .NET Core.
Use ILSpy in Visual Studio, VS Code or the command line
If you prefer to stay in your editor, ILSpy is available as a Visual Studio extension and as a Visual Studio Code extension. Visual Studio 2022 and 2026 ship with decompilation support for F12 enabled by default, using the project's engines, according to the README.
For scripting or servers, the project provides ILSpyCmd, a dotnet tool that runs on Linux, Mac and Windows. The README also mentions PowerShell cmdlets and NuGet packages (ICSharpCode.Decompiler and ICSharpCode.ILSpyX) for building your own tools.
- Visual Studio extension (marketplace listing from the project).
- Visual Studio Code extension (available on the marketplace and Open VSX).
- ILSpyCmd, installed as a dotnet tool.
- ICSharpCode.Decompiler and ICSharpCode.ILSpyX NuGet packages.
What people use it for
- Reading the code of a third-party .NET library when you do not have its source.
- Debugging a NuGet package by checking how one of its methods behaves internally.
- Studying how C# constructs compile to intermediate language.
- Inspecting .NET assemblies on Linux or macOS machines.
Frequently asked questions
Is ILSpy free?
Yes. ILSpy is distributed under the MIT License. The project's About page and third-party notices describe the license details.
Does ILSpy run on Linux and macOS?
Yes. The desktop UI is built with Avalonia and runs on Windows, Linux, and macOS. The README also describes building the desktop UI on Unix and Mac using the .NET SDK.
How do I install ILSpy?
The simplest option is to download a release from the project's Releases page. To build from source, clone the repository, run git submodule update --init --recursive, and then run dotnet build ILSpy.Desktop.slnf.
What is the difference between ILSpy and dnSpy, dotPeek or Mono.Cecil?
The source lists dnSpy, JetBrains dotPeek and Mono.Cecil as comparable projects. It does not compare their features, so check each project's own documentation before choosing. ILSpy's own strengths listed in the README include cross-platform desktop support and a command-line tool.
Can ILSpy decompile non-.NET programs?
No. ILSpy is focused on .NET assemblies, so it is not meant for decompiling other languages.
Does ILSpy send my files anywhere?
According to the README privacy policy, ILSpy does not collect personally identifiable information, does not send user files to third-party services, and does not use an APM service for telemetry.
New agent skills, repos and AI tools — every week
The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.
Our verdict
ILSpy suits developers, engineers and students who need to read or inspect .NET assemblies, especially on Linux or macOS. It is not the right tool for non-.NET languages, and the README does not address whether decompiled code can be reused, so anyone wanting to copy proprietary code should take legal advice first.
Install options & downloads