ILSpy Versions Save

.NET Decompiler with support for PDB generation, ReadyToRun, Metadata (&more) - cross-platform!

v9.0-preview1

3 weeks ago

ILSpy 9.x is based on .NET 8.0. All artifacts except the self-contained distribution are built framework-dependent, which means .NET 8.0 or later must be installed prior to starting ILSpy.

Breaking Changes

  • ICSharpCode.Decompiler: Added MetadataFile base class for PEFile
  • ICSharpCode.Decompiler: IModule.PEFile is now named IModule.MetadataFile
  • ICSharpCode.Decompiler/ILSpyX: Added IFileLoader API to allow for easier extensibility of supported file formats (see #3191)
  • ILSpy: Split BAML decompiler into library and add-in (see #3178)
  • ILSpy/ILSpyX: Moved non-UI analyzer API to ILSpyX (see #3186)
  • ICSharpCode.Decompiler: IProjectFileWriter and IProjectInfoProvider APIs are now public (see #3151 and #3191)

Performance

  • Activate Dynamic Adaptation To Application Sizes (DATAS) (#3122).
  • RDP hardware acceleration (#3122): Enabling hardware acceleration for Remote Desktop Protocol (RDP) to boost performance.

New Language Features

  • Update pattern-detection to Roslyn v4.9.2
  • Added support for switch on (ReadOnly)Span<char> using a compiler-generated hash function.
  • Added new a.GetValueOrDefault(b) -> a ?? b transform for side-effect-free default values.

Enhancements

  • Added support for reading standalone ECMA-335 metadata (portable PDB and other metadata blobs) (see #3149)
  • Added support for reading WebCIL assemblies (IL embedded in WASM) (see #3184)
  • #3118: Add "Clear assembly list" menu item.
  • #2893: Add option to disable automatic assembly loading.
  • IL output: Add indentation level to make it easier to see custom attributes belonging to interface implementations.
  • IL output: Print metadata token of custom attribute.

Contributions

  • Fix metadata display of DynamicLocalVariable and DefaultNamespace custom debug information (#3111, @ElektroKill)
  • Read and use tuple element names and dynamic type information from PDBs (#3114, @ElektroKill)
  • Adjust colors of AvalonEdit built-in highlightings for dark themes (#3138, @ltrzesniewski)
  • Bugfix: infinite loop in DetermineEffectiveAccessibility (#3164, @yzdeveloper)
  • TreeView: Add referenced types, members and exported types under references (#3092, @fowl2)
  • Add support for Mono C# compiler 2.6.4 pinned region with array variable (#3110, @ElektroKill)

Bug fixes

  • Fix #3072: Ignoring resources with the same name as a namespace.
  • Fix bug in UnknownType: Ensuring that the FullName of nested unknown types contains the outer type name(s), not just the namespace and nested type name.
  • Fix #3153: Always using SHA1 for public key tokens.
  • Fix ILSpy for ZIP files/VSIX with bundle signatures: Enabling ILSpy to open ZIP files and VSIX packages containing bundle signatures.
  • Omit package entries from the treeview that denote the directory.
  • Fix #3142: Exception when analyzing source of library with global assembly attributes
  • Fix #3113: Remove GetAlternativeName and instead reuse existing names, if there are no conflicts.

And many other fixes, for a full list click here.

v8.2

5 months ago

ILSpy 8.x is based on .NET 6.0. All artifacts except the self-contained distribution are built framework-dependent, which means .NET 6.0.2 or later must be installed prior to starting ILSpy.

New Language Features

  • C# 7.1 Pattern matching with generics
  • C# 8.0 Recursive patterns
  • C# 9.0 Relational patterns
  • C# 9.0 not patterns
  • C# 10.0 static abstract members in interfaces
  • C# 11.0 switch on (ReadOnly)Span<char>

Contributions

  • Add entry size info (@startewho, #3052)
  • Add GC Info to R2R output (@eduardo-vp, #3076)
  • Update R2R (@cshung, #3088)
  • Reduce "unsafe" by replacing byte* pointer usage with ReadOnlySpan<byte> (@fowl2, #3106 )

Enhancements

  • #3090: add support for the NUGET_PACKAGES environment variable
  • Fixed some quirks in our search: #3064, #3065 and #3038

Performance

  • #3075: Avoid processing already-transformed blocks by introducing BlockTransformContext.IndexOfFirstAlreadyTransformedInstruction, which allows us to track already transformed instructions after a block has been merged into another by ConditionDetection.
  • #3075: Add NextSetBit operation to BitSet to avoid looking at every store bit individually in ReachingDefinitionsVisitor.GetStores()
  • #3075: Fix ILVariableEqualityComparer.GetHashCode
  • #3075: Improve performance of CSharpResolver.LookupSimpleNameOrTypeName in cases with a large number of local variables.
  • #3075: Eliminate recursion in some parts of the decompiler engine
  • ILSpy UI: #3057 - sub-optimal use of StringBuilder when constructing tree-node labels

Bug fixes

  • #3061: Handler blocks of exception filter blocks do not have a header.
  • #3103: unaligned.stobj cannot be transformed into inline assignment
  • #3091: extension methods named Add were skipping some checks in AccessPathElement.IsMethodApplicable.
  • #3004: MetadataModule.ResolveEntity() returning null for System.IntPtr when C# 11 native integers are enabled.
  • #3105 - VS2017-2019 addin didn't properly match subdirectory structure of 2022 addin
  • #3014: Missing type information in lambda expressions

And many other fixes, for a full list click here.

v8.1.1

7 months ago

Release notes for 8.1 apply https://github.com/icsharpcode/ILSpy/releases/tag/v8.1 as this release is a bugfix release only.

Fixed bug #3069 in switch-on-string detection, where complex switches compiled with newer versions of the C# compiler would cause a crash. Other minor fixes included too.

For details please see https://github.com/icsharpcode/ILSpy/compare/v8.1...v8.1.1

v8.1

8 months ago

ILSpy 8.x is based on .NET 6.0 compared to .NET Framework 4.7.2 for the previous generations of ILSpy. All artifacts except the self-contained distribution are built framework-dependent, which means .NET 6.0.2 must be installed prior to starting ILSpy.

New Language Features

  • C# 11 checked operators
  • C# 11 unsigned right shift operator
  • C# 11 UTF8 string literals
  • C# 11 numeric IntPtr
  • C# 11 ref fields and scoped
  • mcs 2.6.4 pinned regions
  • Updated pattern-detection for Roslyn 4.6.0

Contributions

  • Copy clipboard with full syntax-highlighting (#3045 by @ltrzesniewski)
  • Fix sequence-points on expression-bodied members (#3032 by @KirillOsenkov)
  • Fix annotations on nested type references (#3030 by @ltrzesniewski)
  • Add clipboard-related context menu to resources tables (#3024 by @miloush)
  • Fix decompilation of record with missing base type (#3021 by @andrewcrawley)
  • Add support for mcs 2.6.4 pinned regions (#3015 by @ElektroKill)
  • Improvements in CustomDebugInformation metadata table (#2799 by @fowl2)
  • Fix ArgumentOutOfRangeException on unexpected file in GAC (#2960 by @ificator)
  • Support for compound-assignments on pointers (by @ElektroKill)
  • Added a search box for resource tables (by @miloush)

Enhancements

  • Default update check for dotnet tool ilspycmd (#3035). Use --disable-updatecheck in automation scenarios.
  • VS 2022 extension ships with both x64 and ARM64 binaries (#3009)
  • Added ARM64 binaries and ARM64 installer downloads
  • WholeProjectDecompiler: Improve resources -> resx conversion
  • Improve decompilation of compound-assignments involving local variables
  • Refactor ILReader to support re-imports of basic blocks (#901)

Bug fixes

  • #2891: Populate framework_dirs with the correct values depending on the current host runtime.

And many other fixes, for a full list click here.

v8.0

11 months ago

ILSpy 8 is based on .NET 6.0 compared to .NET Framework 4.7.2 for the previous generations of ILSpy. All artifacts except the self-contained distribution are built framework-dependent, which means .NET 6.0.2+ must be installed prior to starting ILSpy.

Note - none of the following lists are exhaustive except of course the first one:

New Language Features

  • C# 10: record structs
  • C# 11: Required members
  • C# 11: ref fields
  • C# 10: Support DefaultInterpolatedStringHandler
  • Output attributes on lambda expressions
  • Updated pattern detection for Roslyn 4.4.0

Contributions

  • More themes - Light/Dark are the original ones, R# & VS Code added (see #2906 and #2931 by @ltrzesniewski)
  • Improve selected text highlighting (see #2938 by @Konctantin)
  • Namespace nesting in ILSpy tree view (based on code provided by @ds5678 in #2667)
  • ilspycmd received support for the "nested directories" option on project export. (see #2636 by @GreyXor)
  • ilspycmd support for generating a solution from multiple projects (based on code provided by @marwie in #2364)
  • Fix the ordering of COM interface methods, properties, and events to appear in their originally defined order (see #2639 by @zhuman)
  • Allow user to provide ID when generating a PDB (see #2678 by @andrewcrawley)
  • Assume conventionally named unresolved method references are properties or events (see #2677 by @fowl2)
  • Add EnableWindowsTargeting propery to csprojs targeting net6.0-windows (see #2752 by @clin1234)
  • Reduce allocations in TransformArrayInitializers (see #2731 by @ElektroKill)
  • Fix crash target framework detection with C++/CLI (see #2698 by @kant2002)
  • Add option to always fully qualify type names with global:: (see #2762 by @hexafluoride)
  • Fix #2736: ILSpy decides to fully qualify type name when it is not necessary (see #2789 by @ElektroKill)
  • Add progress reporting to PortablePdbWriter (see #2802 by @andrewcrawley)
  • Add IEntityProcessor to ReflectionDisassembler (see #2835 by @tom-englert)
  • Fix dynamic type index calculation in ApplyAttributeTypeVisitor (see #2840 by @ElektroKill)
  • Add support for another using pattern (see #2841 by @ElektroKill)
  • Fix debug assertion regarding using directives (see #2843 by @ElektroKill)
  • Add support for VB cached delegate initialization (see #2844 by @ElektroKill)
  • Add support for VB auto events (see #2845 by @ElektroKill)
  • Add support for lock statements within yield return state machines (see #2846 by @ElektroKill)
  • Add support for VB async state-machines (see #2853 by @ElektroKill)
  • Enable various passing ignored tests (see #2852 and #2854 by @ElektroKill)
  • Improve support for post-increment/decrement on pointers (see #2856 by @ElektroKill)
  • Add support for record structs in CSharpAmbience (see #2911 by @ElektroKill)
  • Add support for Visual Basic Yield Return state machine decompilation (see #2874 by @ElektroKill)
  • Fix ResXResourceWriter support for MemoryStream resource element (see #2895 by @ElektroKill)
  • Use .interfaceimpl type syntax (see #2903 by @ltrzesniewski)
  • Fix empty parameter names in delegate declarations (see #2912 by @ElektroKill)
  • Support disassembling ReadyToRun binaries compiled using composite mode (see #2944 by @cshung)
  • Make return duplication in ControlFlowSimplification less aggressive (see #2972 by @ElektroKill)
  • Show a dark title bar when a dark theme in ILSpy is selected (see #2948 by @tom-englert)
  • Consider constructor type when lifting decimal constants (see #2953 by @ElektroKill)
  • Extend EliminateRedundantTryFinally in ReduceNestingTransform (see #2959 by @ElektroKill)

Enhancements

  • Move Settings to ILSpyX (see #2869). Additionally, many platform-independent APIs have been moved to ICSharpCode.ILSpyX since Preview1. ILSpyX is published as a standalone NuGet package for others to reuse.
  • Performance optimization of analyzers (see #2643)
  • Various performance improvements in the type system and decompiler engine. (see #2766 and #2754)
  • #2684: Iteratively unhide compiler-generated code, if it is referenced by user-code
  • Support native ints in "Combine bit.and into shift" transform
  • #2780: Show embedded resource size
  • Use Unsafe.SizeOf when taking the size of a managed type

Bug fixes

Please see the release notes for Preview1 to RC1 for details or, for a full list of changes click here.

v8.0-rc1

11 months ago

ILSpy 8 is based on .NET 6.0 compared to .NET Framework 4.7.2 for the previous generations of ILSpy. All artifacts except the self-contained distribution are built framework-dependent, which means .NET 6.0.2 must be installed prior to starting ILSpy.

Contributions

  • PowerShell manifest (see #2976 by @jhoek)
  • Make return duplication in ControlFlowSimplification less aggressive (see #2972 by @ElektroKill)
  • Update Chinese translation (see #2970 by @Nyrest)
  • Show a dark title bar when a dark theme in ILSpy is selected (see #2948 by @tom-englert)
  • Consider constructor type when lifting decimal constants (see #2953 by @ElektroKill)
  • Add more theme colors (see #2952 by @ltrzesniewski)

Enhancements

  • R2R package refreshes

Bug fixes

  • Fix #2956: Prevent loading all ResourceDictionaries eagerly
  • Fix #2945: Do not treat arbitrary method references pointing to members of the current type definition as part of the method. Only do so for compiler-generated methods.
  • Fix #2888: Tuple syntax cannot be used in is-expressions, use underlying type instead.
  • Fix #2921: struct type definition contains duplicate default constructor.

And many other fixes, for a full list click here.

v8.0-preview4

1 year ago

ILSpy 8 is based on .NET 6.0 compared to .NET Framework 4.7.2 for the previous generations of ILSpy. All artifacts except the self-contained distribution are built framework-dependent, which means .NET 6.0.2 must be installed prior to starting ILSpy.

Contributions

  • More themes - Light/Dark are the original ones, R# & VS Code added (see #2906 and #2931 by @ltrzesniewski)
  • Improve selected text highlighting (see #2938 by @Konctantin)
  • Add support for record structs in CSharpAmbience (see #2911 by @ElektroKill)
  • Add support for Visual Basic Yield Return state machine decompilation (see #2874 by @ElektroKill)
  • Fix ResXResourceWriter support for MemoryStream resource element (see #2895 by @ElektroKill)
  • Use .interfaceimpl type syntax (see #2903 by @ltrzesniewski)
  • Fix empty parameter names in delegate declarations (see #2912 by @ElektroKill)
  • Support disassembling ReadyToRun binaries compiled using composite mode (see #2944 by @cshung)

Enhancements

  • Move Settings to ILSpyX (see #2869)
  • Move all code related to single instance logic to separate class (see #2871)

Bug fixes

  • Fix #2933: TwoLetterISOLanguageName is insufficient for loading localized documentation.
  • Fix #2915: inassembly search filter is case sensitive and automatically suggests the wrong term
  • Fix #2922: System.ArgumentOutOfRangeException when decompiling a function

And many other fixes, for a full list click here.

v8.0-preview3

1 year ago

ILSpy 8 is based on .NET 6.0 compared to .NET Framework 4.7.2 for the previous generations of ILSpy. All artifacts except the self-contained distribution are built framework-dependent, which means .NET 6.0.2 or newer minor release must be installed prior to starting ILSpy.

IMPORTANT: If you don't have the .NET Desktop Runtime installed, the .NET bootstrapper (a dialog popping up when you try to run ILSpy) will link you to the .NET Runtime which supports only console apps! Please follow the above link and download the Desktop Runtime.

New Language Features

  • C# 11: Required members
  • Updated pattern detection for Roslyn 4.4.0

Contributions

  • Add option to always fully qualify type names with global:: (see #2762 by @hexafluoride)
  • Refresh ready to run for .NET 7 (see #2774 by @cshung)
  • Fix #2736: ILSpy decides to fully qualify type name when it is not necessary (see #2789 by @ElektroKill)
  • Fix initialization of FakeProperty with setter (see #2792 by @exyi)
  • Add progress reporting to PortablePdbWriter (see #2802 by @andrewcrawley)
  • Include assembly name in decompiled code (see #2810 by @miloush)
  • Add IEntityProcessor to ReflectionDisassembler (see #2835 by @tom-englert)
  • Fix dynamic type index calculation in ApplyAttributeTypeVisitor (see #2840 by @ElektroKill)
  • Add support for another using pattern (see #2841 by @ElektroKill)
  • Fix debug assertion regarding using directives (see #2843 by @ElektroKill)
  • Add support for VB cached delegate initialization (see #2844 by @ElektroKill)
  • Add support for VB auto events (see #2845 by @ElektroKill)
  • Add support for lock statements within yield return state machines (see #2846 by @ElektroKill)
  • Add support for VB async state-machines (see #2853 by @ElektroKill)
  • Enable various passing ignored tests (see #2852 and #2854 by @ElektroKill)
  • Improve support for post-increment/decrement on pointers (see #2856 by @ElektroKill)

Enhancements

  • Various performance improvements in the type system and decompiler engine. (see #2766 and #2754)
  • Support native ints in "Combine bit.and into shift" transform
  • #2780: Show embedded resource size

Bug fixes

  • Fix #2759: Some characters cause rendering issues in the tree view causing ILSpy to freeze. Also ignore embedded resources with an invalid offset, treat them as having zero byte length.
  • Fix #2763: Improve decompilation of switch-on-enum by preserving enum type information when inlining local variables into SwitchInstruction.Value.
  • PDB generation: Use row ID instead of token in AsyncDebugInfo blob.
  • Fix #2806: Do not use implicitly typed out variables, if argument and parameter types do not match exactly.
  • #2823: Introduce IType.GetDefinitionOrUnknown() to allow better detection of async state-machines involving unknown types.
  • Fix #2825: Missing whitespace after new()
  • Fix #2827: Allow users to enter search queries that match our prefixes.
  • WholeProjectDecompiler: Fix #2830: Can't decompile project with / in resource name on Windows
  • Fix #2831: Popup/Tooltip scaling on multi-monitor multi-DPI setups.
  • WholeProjectDecompiler: Fix #2850: Make sure that type names longer than 255 characters are handled correctly.

And many other fixes, for a full list click here.

v8.0-preview2

1 year ago

ILSpy 8 is based on .NET 6.0 compared to .NET Framework 4.7.2 for the previous generations of ILSpy. All artifacts except the self-contained distribution are built framework-dependent, which means .NET 6.0 must be installed prior to starting ILSpy.

New Language Features

  • C# 11: ref fields
  • C# 10: record structs
  • C# 10: Support DefaultInterpolatedStringHandler
  • Updated pattern detection for Roslyn 4.3.0
  • Output attributes on lambda expressions

Contributions

  • Allow user to provide ID when generating a PDB (see #2678 by @andrewcrawley)
  • Assume conventionally named unresolved method references are properties or events (see #2677 by @fowl2)
  • Add EnableWindowsTargeting propery to csprojs targeting net6.0-windows (see #2752 by @clin1234)
  • Reduce allocations in TransformArrayInitializers (see #2731 by @ElektroKill)
  • Fix allowed language versions in ilspycmd (see #2703 by @superstrom)
  • Fix crash target framework detection with C++/CLI (see #2698 by @kant2002)

Enhancements

  • #2684: Iteratively unhide compiler-generated code, if it is referenced by user-code
  • Use Unsafe.SizeOf when taking the size of a managed type
  • #2718: Move XAML files that have an x:Class declaration next to their C# counterparts when using WholeProjectDecompiler

Bug fixes

  • #2691: Do not use AssemblyDefintion.GetAssemblyName(). This fails in culture-invariant mode (ilspycmd) when trying to work with satellite assemblies, because System.Reflection.AssemblyName tries to retrieve CultureInfo of the assembly culture
  • #2733: Ignore bad metadata when trying to resolve ResolutionScope
  • #2741: CallBuilder produces invalid invocation target when disambiguating calls to protected methods

And many other fixes, for a full list click here.

v8.0-preview1

2 years ago

ILSpy 8 is based on .NET 6.0 compared to .NET Framework 4.7.2 for the previous generations of ILSpy. All artifacts except the self-contained distribution are built framework-dependent, which means .NET 6.0 must be installed prior to starting ILSpy. This is true for:

  • the installer
  • the framework-dependent zip
  • the VSIXs

Functionality is supposed to be unchanged and fully functional in this release compared to 7.2. If something works in 7.2 but not 8.0-preview1, please file a bug.

Breaking Changes

  • ILSpy 8.0 will target net60-windows (see #2642) and all plugins will have to be migrated to the new platform.
    • Note: The ICSharpCode.Decompiler engine and NuGet package will continue to target netstandard2.0
  • Platform-independent APIs will be moved to ICSharpCode.ILSpyX, currently that includes (but is not limited to):
    • LoadedAssembly and AssemblyList APIs
    • PdbProvider APIs
  • LoadedAssembly.WaitUntilLoaded() was removed, because it leads to bugs; use await LoadedAssembly.GetLoadResultAsync() instead
  • The MSIX project has been removed and the installer introduced in 7.x will take its place in the Microsoft Store going forward (at RC/RTM).

Contributions

  • ilspycmd received support for the "nested directories" option on project export. (see #2636 by @GreyXor)
  • ilspycmd support for generating a solution from multiple projects (based on code provided by @marwie in #2364)
  • Namespace nesting in ILSpy tree view (based on code provided by @ds5678 in #2667)
  • Fix the ordering of COM interface methods, properties, and events to appear in their originally defined order (see #2639 by @zhuman)

Enhancements

  • Performance optimization of analyzers (see #2643)

Bug fixes

  • #2634: target expressions of delegate references were not decompiled correctly
  • #2632: Make sure that changing the setting "ExpandMemberDefinitions" has an effect when refreshing a decompiled view.
  • #2629: Indentation of method-call chains.
  • #2653: ILSpy reports wrong visibility for overridden protected internal properties if located in another assembly.
  • #2610: Explicitly qualify members in TemplateBindings.
  • #2655: TranslateArrayInitializer crashes with out of order array init

And many other fixes, for a full list click here.