.NET Decompiler with support for PDB generation, ReadyToRun, Metadata (&more) - cross-platform!
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
Siegfried Pammer a1420dd311 Add pretty test for dictionary index initializers 3 days ago
.github Migrate the VS extension to an SDK-style VSIX (dotnet build) and retire the VS2017/2019 add-in (#3808) 2 weeks ago
.vscode Drop the stale net10.0-windows segment from publish-output paths 4 weeks ago
BuildTools Set OpenSSL SHA1 flag in build scripts 5 days ago
ICSharpCode.BamlDecompiler Harden BAML reader against crafted-resource crashes 5 days ago
ICSharpCode.Decompiler Fix #3845: Add option to expand XML documentation comments 4 days ago
ICSharpCode.Decompiler.Generators Extract syntax tree generator emit helpers 5 days ago
ICSharpCode.Decompiler.PowerShell Merge pull request #3758 from icsharpcode/christophwille/nu0626 4 weeks ago
ICSharpCode.Decompiler.TestRunner Carry all RIDs in the decompiler-test lock files 4 weeks ago
ICSharpCode.Decompiler.Tests Add pretty test for dictionary index initializers 3 days ago
ICSharpCode.ILSpyCmd Add a per-assembly target-framework override for reference resolution 7 days ago
ICSharpCode.ILSpyX Add a per-assembly target-framework override for reference resolution 7 days ago
ILSpy Fix #3845: Add option to expand XML documentation comments 4 days ago
ILSpy-tests@4ccc3f0108 Bump ILSpy-tests: isolate fixtures from host warnings-as-errors 4 weeks ago
ILSpy.AddIn.VS2022 Migrate the VS extension to an SDK-style VSIX (dotnet build) and retire the VS2017/2019 add-in (#3808) 2 weeks ago
ILSpy.BamlDecompiler.Tests Harden BAML reader against crafted-resource crashes 5 days ago
ILSpy.Installer Drop the stale net10.0-windows segment from publish-output paths 4 weeks ago
ILSpy.ReadyToRun Add a per-assembly target-framework override for reference resolution 7 days ago
ILSpy.Tests Fix #3845: Add option to expand XML documentation comments 4 days ago
ILSpy.Tests.Windows Add a per-assembly target-framework override for reference resolution 7 days ago
TestFixtures.Resources Add pwsh dev scripts, repo-wide lock files, and CI NuGet caching 4 weeks ago
TestPlugin Add a per-assembly target-framework override for reference resolution 7 days ago
doc Update third party notices 3 weeks ago
.editorconfig dev: fix editorconfig parsing on some editors 3 weeks ago
.git-blame-ignore-revs #2128: Add .git-blame-ignore-revs 6 years ago
.gitattributes Add Linux and macOS publish and packaging scripts 3 weeks ago
.gitignore Ignore the local Claude Code session directory 4 weeks ago
.gitmodules update submodule 1 year ago
.tgitconfig Add tgit.icon project config 12 years ago
CLAUDE.md Migrate the VS extension to an SDK-style VSIX (dotnet build) and retire the VS2017/2019 add-in (#3808) 2 weeks ago
Directory.Build.props Treat warnings as errors repo-wide 4 weeks ago
Directory.Packages.props Add a per-assembly target-framework override for reference resolution 7 days ago
ILSpy.Desktop.slnf Rename ILSpy.Wpf.slnf -> ILSpy.Desktop.slnf with updated contents 4 weeks ago
ILSpy.Installer.sln dev: Strip BOM mark from text files 10 months ago
ILSpy.VSExtensions.slnx Migrate the VS extension to an SDK-style VSIX (dotnet build) and retire the VS2017/2019 add-in (#3808) 2 weeks ago
ILSpy.XPlat.slnf Rename ics.d.Console to ics.ILSpyCmd 4 years ago
ILSpy.sln Add the AST source generator for the C# syntax tree 2 weeks ago
LICENSE Move license.txt to root folder LICENSE file 2 years ago
NuGet.config .NET 11 for Tests (#3695) 3 months ago
README.md Migrate the VS extension to an SDK-style VSIX (dotnet build) and retire the VS2017/2019 add-in (#3808) 2 weeks ago
SECURITY.md Create SECURITY.md 2 years ago
build.ps1 Set OpenSSL SHA1 flag in build scripts 5 days ago
clean.ps1 Set OpenSSL SHA1 flag in build scripts 5 days ago
decompiler-nuget-demos.ipynb Update Notebook for 8.1 3 years ago
global.json .NET 11 for Tests (#3695) 3 months ago
publish.ps1 Set OpenSSL SHA1 flag in build scripts 5 days ago
publishlocaldev.ps1 Set OpenSSL SHA1 flag in build scripts 5 days ago
restore.ps1 Set OpenSSL SHA1 flag in build scripts 5 days ago
updatedeps.ps1 Set OpenSSL SHA1 flag in build scripts 5 days ago

README.md

ILSpy NuGet Build ILSpy Mastodon Bluesky ILSpy VS extension

ILSpy is the open-source, cross-platform .NET assembly browser and decompiler. The desktop UI runs on Windows, Linux, and macOS (built on Avalonia).

Download: latest release | latest CI build (master) | Microsoft Store (RTM versions only)

Decompiler Frontends

Aside from the cross-platform desktop UI ILSpy (downloadable via Releases, see also plugins), the following other frontends are available:

  • Visual Studio 2022/2026 ship with decompilation support for F12 enabled by default (using our engines v8.2 and v9.1 respectively).
  • Our Visual Studio 2022 extension marketplace (works with VS 2026 as well)
  • Our Visual Studio Code Extension repository | marketplace | open-vsx
  • Our dotnet tool for Linux/Mac/Windows - check out ILSpyCmd in this repository | dotnet tool install
  • C# for Visual Studio Code ships with decompilation support as well. To enable, activate the setting "Enable Decompilation Support".
  • In Visual Studio 2019, you have to manually enable F12 support. Go to Tools / Options / Text Editor / C# / Advanced and check "Enable navigation to decompiled source"
  • Our Visual Studio 2017/2019 extension marketplace
  • Our ICSharpCode.Decompiler NuGet for your own projects
  • Our Linux/Mac/Windows PowerShell cmdlets in this repository

Features

  • Decompilation to C# (check out the language support status)
  • Whole-project decompilation
  • Search for types/methods/properties (learn about the options)
  • Hyperlink-based type/method/property navigation
  • Base/Derived types navigation, history
  • Assembly metadata explorer (feature walkthrough)
  • BAML to XAML decompiler
  • ReadyToRun binary support for .NET Core (see the tutorial)
  • Extensible via plugins
  • Additional features in DEBUG builds (for the devs)

License

ILSpy is distributed under the MIT License. Please see the About doc for details, as well as third party notices for included open-source libraries.

How to build

Windows:

  • Make sure Windows PowerShell (at least version) 5.0 or PowerShell 7+ is installed.
  • Clone the ILSpy repository using git.
  • Execute git submodule update --init --recursive to download the ILSpy-Tests submodule (used by some test cases).
  • Install Visual Studio (documented version: 18.0/2026). You need the following workload components:
    • Workload ".NET Desktop Development". This workload includes the .NET Framework 4.8 SDK and the .NET Framework 4.7.2 targeting pack, as well as the .NET 10.0 SDK (ILSpy.csproj targets .NET 10.0, but we have net472 projects too). Our unit tests require .NET 11.0 SDK.
    • Workload "Visual Studio extension development" (Note: ILSpy.VSExtensions.slnx is separate from ILSpy.sln and thus this workload is optional)
    • Individual Component "MSVC v143 - VS 2022 C++ x64/x86 build tools" (or similar)
      • The VC++ toolset is optional; if present it is used for editbin.exe to modify the stack size used by ILSpy.exe from 1MB to 16MB, because the decompiler makes heavy use of recursion, where small stack sizes lead to problems in very complex methods.
  • Open ILSpy.sln in Visual Studio.
    • NuGet package restore will automatically download further dependencies
    • Run project "ILSpy" for the ILSpy UI
    • Use the Visual Studio "Test Explorer" to see/run the tests
    • If you are only interested in a specific subset of ILSpy, you can also use
      • ILSpy.Desktop.slnf: for the cross-platform Avalonia UI and its tests
      • ILSpy.XPlat.slnf: for the cross-platform CLI (ilspycmd) or PowerShell cmdlets
      • ILSpy.VSExtensions.slnx: for the Visual Studio extensions

Note: Visual Studio includes a version of the .NET SDK that is managed by the Visual Studio installer - once you update, it may get upgraded too. Please note that ILSpy is only compatible with the .NET 11.0 SDK and Visual Studio will refuse to load some projects in the solution (and unit tests will fail). If this problem occurs, please manually install the .NET 11.0 SDK from here.

Unix / Mac:

  • Make sure .NET 10.0 SDK (for run) and .NET 11.0 SDK (for tests) is installed.
  • Make sure PowerShell is installed (formerly known as PowerShell Core)
  • Clone the repository using git.
  • Execute git submodule update --init --recursive to download the ILSpy-Tests submodule (used by some test cases).
  • Use dotnet build ILSpy.Desktop.slnf to build the cross-platform Avalonia desktop UI; run it with dotnet run --project ILSpy.
  • Use dotnet build ILSpy.XPlat.slnf to build only the CLI tool (ilspycmd) and PowerShell cmdlets.

How to contribute

Current and past contributors.

Privacy Policy for ILSpy

ILSpy does not collect any personally identifiable information, nor does it send user files to 3rd party services. ILSpy does not use any APM (Application Performance Management) service to collect telemetry or metrics.