.NET Decompiler with support for PDB generation, ReadyToRun, Metadata (&more) - cross-platform!
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
Go to file
Christoph Wille bdb3235663 Lock looking for WiX binaries exclusively to packages folder 1 day ago
.github Fix #2984: Store pointing to v8.0 submission, building of arm64 setup 1 day ago
BuildTools Enable auto-formatting in commit-hook. 2 weeks ago
ICSharpCode.Decompiler Merge pull request #2993 from icsharpcode/reimport 6 days ago
ICSharpCode.Decompiler.PowerShell Update README for PS cmdlets module 1 month ago
ICSharpCode.Decompiler.TestRunner Use .NET 7.0 as target framework for the tests. 1 week ago
ICSharpCode.Decompiler.Tests Merge pull request #2993 from icsharpcode/reimport 6 days ago
ICSharpCode.ILSpyCmd Update NuGet packages & clean up dependency references a bit 3 months ago
ICSharpCode.ILSpyX Remove unnecessary package references. (#2990) 1 week ago
ILSpy Rename lifetime annotation to `ScopedRef` 1 week ago
ILSpy-tests@6f8860e420 Add test configuration for mcs 5.23.0 2 years ago
ILSpy.AddIn Use latest VS SDK (#2767) 10 months ago
ILSpy.AddIn.Shared Rename ILSpy.AddIn.VS17 to ILSpy.AddIn.VS2022 2 years ago
ILSpy.AddIn.VS2022 Use latest VS SDK (#2767) 10 months ago
ILSpy.BamlDecompiler Update NuGet packages & clean up dependency references a bit 3 months ago
ILSpy.BamlDecompiler.Tests Add missing files. 7 months ago
ILSpy.Installer Lock looking for WiX binaries exclusively to packages folder 1 day ago
ILSpy.ReadyToRun Refresh ready to run package 4 weeks ago
ILSpy.Tests Use test-summary/action@v1 for test reports. 1 year ago
SharpTreeView Add EnableWindowsTargeting propery to csprojs targeting net6.0-windows 11 months ago
TestPlugin Move Settings to ILSpyX (#2869) 6 months ago
doc Change info across the board to -2023 5 months ago
.editorconfig #2128: change .editorconfig according to our new code style. 3 years ago
.git-blame-ignore-revs #2128: Add .git-blame-ignore-revs 3 years ago
.gitattributes Add .gitattributes and normalize newlines 10 years ago
.gitignore PowerShell module manifest (#2976) 1 month ago
.gitmodules Remove AD submodule. 4 years ago
.tgitconfig Add tgit.icon project config 9 years ago
.vsconfig Update README.md for our new net60 target. Fixes #2647 1 year ago
ILSpy.AddIn.slnf Add TestRunner project to sln filters. 1 year ago
ILSpy.Installer.sln Make Installer top-level solution and build it post-publish of ILSpy.sln (#2991) 1 week ago
ILSpy.Wpf.slnf PdbProvider.Cecil no longer exists (-> ILSpyX) 12 months ago
ILSpy.XPlat.slnf Rename ics.d.Console to ics.ILSpyCmd 1 year ago
ILSpy.sln Make Installer top-level solution and build it post-publish of ILSpy.sln (#2991) 1 week ago
NuGet.config Support disassembling ReadyToRun binaries compiled using composite mode 2 months ago
README.md Fix #2984: Store pointing to v8.0 submission, building of arm64 setup 1 day ago
clean.bat Use VS2022 when building with the .bat files 1 year ago
debugbuild.bat Use VS2022 when building with the .bat files 1 year ago
decompiler-nuget-demos.ipynb Release of 7.2 P3 2 years ago
global.json Use .NET 7.0 as target framework for the tests. 1 week ago
packages.props Re-order packages.props 1 week ago
publish.ps1 Make Installer top-level solution and build it post-publish of ILSpy.sln (#2991) 1 week ago
releasebuild.bat Use VS2022 when building with the .bat files 1 year ago

README.md

ILSpy NuGet Build ILSpy Mastodon Follow Twitter Follow ILSpy VS extension

ILSpy is the open-source .NET assembly browser and decompiler.

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

Decompiler Frontends

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

  • Visual Studio 2022 ships with decompilation support for F12 enabled by default (using our engine v7.1).
  • 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"
  • C# for Visual Studio Code ships with decompilation support as well. To enable, activate the setting "Enable Decompilation Support".
  • Our Visual Studio 2022 extension marketplace
  • Our Visual Studio 2017/2019 extension marketplace
  • Our Visual Studio Code Extension repository | marketplace
  • Our Linux/Mac/Windows ILSpy UI based on Avalonia - check out https://github.com/icsharpcode/AvaloniaILSpy
  • Our ICSharpCode.Decompiler NuGet for your own projects
  • Our dotnet tool for Linux/Mac/Windows - check out ILSpyCmd in this repository
  • 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 PowerShell (at least version) 5.0 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: 17.1). You can install the necessary components in one of 3 ways:
    • Follow Microsoft's instructions for importing a configuration, and import the .vsconfig file located at the root of the solution.
    • Alternatively, you can open the ILSpy solution (ILSpy.sln) and Visual Studio will prompt you to install the missing components.
    • Finally, you can manually install the necessary components via the Visual Studio Installer. The workloads/components are as follows:
      • 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 6.0 SDK and .NET 7.0 SDK (ILSpy.csproj targets .NET 6.0, but we have net472+net70 projects too). Note: The optional components of this workload are not required for ILSpy
      • Workload "Visual Studio extension development" (ILSpy.sln contains a VS extension project) Note: The optional components of this workload are not required for ILSpy
      • 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.Wpf.slnf: for the ILSpy WPF frontend
        • ILSpy.XPlat.slnf: for the cross-platform CLI or PowerShell cmdlets
        • ILSpy.AddIn.slnf: for the Visual Studio plugin

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 6.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 6.0 SDK from here.

Unix / Mac:

  • Make sure .NET 6.0 SDK 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.XPlat.slnf to build the non-Windows flavors of ILSpy (.NET Core Global Tool and PowerShell Core).

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.