Releases: icsharpcode/ILSpy
ILSpy 10.0 Preview 2
This preview release is based on .NET 10.0. Please make sure that you have it installed on your machine beforehand.
New Language Features
- Update pattern detection to Roslyn 5.0 RTM
- C# 13:
allows ref structconstraint - C# 14:
extensionmembers
Enhancements
CSharpConversions: General improvements, fixing various missing rules for C# up to version 9.- #3344: Support
ckfiniteIL opcode in decompiler - #3563: Disassembler: Add support for ildasm /caverbal format
- Detection of records and primary constructors: various bugfixes and improvements. (Special thanks to @sonyps5201314 and @mmusu3)
User Interface
- #3521: Add API to set an initially highlighted entity after navigation
- Navigate visible history (see #3591 by @miloush)
- Improve WordBreak in CustomDialog (see #3535 by @CreateAndInject)
- Use AssemblyWarning when AssemblyReference load faulted (see #3013 by @workgroupengineering)
- Refactoring of EntityToString API (see #3635)
- Removed translations (see #3648)
Contributions
- Allow extracting multiple package entries (see #3508 by @CreateAndInject)
- Support
allows ref structconstraint (see #3537 by @jjonescz) - Allow passing an
IDecompilerTypeSystemrather than aDecompilerTypeSystemtoCSharpDecompiler(see #3529 by @lordmilko) - Add
DecompilerSettings.ExpandParamsArguments(see #3534 by @MSchmoecker) - Add
DecompilerSettings.AlwaysMoveInitializer: Always move initializer from static constructor to field initializer (see #3540 by @miloush) - Improve decompilation of unmanaged function pointers (see #3620 by @ds5678)
- Improve decompilation of pre-increment operators (see #3472 by @ds5678)
- Fix #3462: Scrolling with scroll wheel breaks after using file search (see #3538 by @tom-englert)
- Support batch PDB generation (see #3619 by @sonyps5201314)
- Fixes for primary constructors (see #3614 by @mmusu3)
- Improve inlining of boxed values (see #3587 by @ds5678)
- List name first in ILSpy title for multiple instances (see #3589 by @miloush)
- Improve Framework Id detection (see #3581 by @ds5678)
- Enable detection of .NET version without TargetFrameworkAttribute (see #3580 by @ds5678)
- Do not create object initializers for tuples (see #3579 by @ds5678)
- Fix lower case type name conflicting with variable name (see #3572 by @ds5678)
- Fix regression in decompiling local functions with default parameters (see #3560 by @ds5678)
- Copy-propagate the stack slot for collection initializers (see #3554 by @ds5678)
- Normalize UTF-8 BOM Marks and ps1 Indention (see #3546 by @petercrabtree)
- Minor Dev Environment Fixes (.editorconfig cleanup, typo fix, .gitignore tweak) (see #3544 by @petercrabtree)
- Replace GeneratePdbForAssembly with GeneratePdbForAssemblies to improve user experience and remove redundant code. (see #3630 by @sonyps5201314)
- Fix the issue where PDBs generated by ILSpy do not match (see #3629 by @sonyps5201314)
- Do not use ObservableObject when ObservableObjectBase is sufficient. (see #3644 by @tom-englert)
API Clean-up
- Removed legacy
UnresolvedUsingScope - Renamed
ResolvedUsingScopetoUsingScope - Removed legacy
ToTypeReference - Removed
ITypeReferenceand implementations
Bug fixes
- Fix #3524: Property without backing field cannot have an initializer.
- Fix #3512: Local function name collides with local variable name
- Fix #2165: DeclareVariables step must update ResolveResult annotation when using out var.
- Fix #3518 by replacing
FixLoneIsInstwith an inlining restriction. - Fix #3465: Operator '>' cannot be applied to operands of type 'X' and 'X'
- Fix #3468: Try harder to avoid ref locals if
UseRefLocalsForAccurateOrderOfEvaluationis not enabled. - Fix #3323: Simplify cleanup in AwaitInFinallyTransform, ensuring that we do not miss any containers.
- Fix #1873: Clear ILRange in CopyPropagation
- Fix #1789: missing hyperlink for
MethodGroupResolveResult. - Fix #3476: Scroll position not restored when navigating back
- Fix #3545: Covariant return not detected for abstract override property
- Fix #3549: Do not crash on encountering nil tokens.
- Fix #3543: Missing parentheses around field assignment expression in list initializers
- DebugDirectoryTreeNode: AddressOfRawData and PointerToRawData columns should use hex display.
- DebugDirectoryTreeNode: PointerToRawData was always showing 0 and AddressOfRawData was showing the wrong value.
- Fix #3577: Properly infer the switch governing type and preserve conversions
- Fix #3626: Do not emit named arguments for bool constants, if it causes the call to become ambiguous.
- Fix #3612: WholeProjectDecompiler.CleanUpName does not count bytes on Unix.
And many other fixes, for a full list click here.
ILSpy 10.0 Preview 1
This preview release is based on preview 6 of .NET 10.0. Please make sure that you have it installed on your machine beforehand.
New Language Features
- #3467: C# 12
InlineArrays - #3500: Added .NET 10 as test target
- #3500: Added minimal language feature support to successfully detect new code patterns used in .NET 10
Enhancements
- #3519: Add API diff feature. Please see the PR for how this feature works, and in the collapsed region at the end of the release notes how such an API diff report could look like (full file is attached to release as ICSharpCode.Decompiler9.1to10Preview1Changes_ApiDiff.md).
- #3494: Add dynamic ILSpy settings options to ILSpyCmd
- #3489: Make
WholeProjectDecompiler.CreateDecompilerprotected virtual to make the decompilation pipeline extensible.
Contributions
- Add configuration option to check for overflow and underflow (see #3484 by @ds5678)
- Allow creating a MetadataFile with a MetadataReader / MetadataStringDecoder (see #3487 by @lordmilko)
- Add an option to not transform
Activator.CreateInstance<T>()tonew T()(see #3497 by @DoctorKrolic) TargetFrameworkandTargetServicesAPIs are now public (see #3501 by @nikitalita)- Support disassembling single file bundle for ILSpy (see #3398 by @cshung)
- Fix stack overflow exception in CSharpResolver (see #3471 by @ds5678)
- Handle explicit optional parameter after default parameter (see #3470 by @ds5678)
- Fix disassembler output, correcting
flag(NUM)toflags(NUM)(see #3473 by @hez2010) - Fix null reference exception when writing resource files (see #3474 by @ds5678)
- Fix SDK-style (modern) inter-project references (see #3502 by @petercrabtree)
- Fix incorrect method match for static methods with instance signature (see #3504 by @MSchmoecker)
Performance
- #3486: Remove XML serialization from DecompilerSettings in ILSpy
Bug fixes
- Fix #3464: Missing cast in interpolated string
- Fix #3482: Drag and Drop is no longer working in the Assemblies tree view.
- Fix #3492: Do not crash, if field used by
RuntimeHelpers.InitializeArrayis malformed.
And many other fixes, for a full list click here.
ICSharpCode.Decompiler Assembly Changes (API diff)
Changed Types
ICSharpCode.Decompiler.DecompilerSettings
| Member | Type | Operation |
|---|---|---|
Clone() : DecompilerSettings |
Method | Removed |
ParamsCollections : bool |
Property | Added |
UseObjectCreationOfGenericTypeParameter : bool |
Property | Added |
InlineArrays : bool |
Property | Added |
CheckForOverflowUnderflow : bool |
Property | Added |
Clone() : DecompilerSettings |
Method | Added |
ICSharpCode.Decompiler.Solution.SolutionCreator
| Member | Type | Operation |
|---|---|---|
WriteSolutionFile(string, IEnumerable<ProjectItem>) : void |
Method | Removed |
WriteSolutionFile(string, List<ProjectItem>) : void |
Method | Added |
ICSharpCode.Decompiler.Semantics.Conversion
| Member | Type | Operation |
|---|---|---|
InlineArrayConversion : Conversion |
Field | Added |
ICSharpCode.Decompiler.TypeSystem.KnownAttribute
| Member | Type | Operation |
|---|---|---|
ParamCollection : KnownAttribute |
Field | Added |
InlineArray : KnownAttribute |
Field | Added |
ICSharpCode.Decompiler.TypeSystem.TypeSystemOptions
| Member | Type | Operation |
|---|---|---|
ParamsCollections : TypeSystemOptions |
Field | Added |
ICSharpCode.Decompiler.TypeSystem.TypeSystemExtensions
| Member | Type | Operation |
|---|---|---|
IsArrayInterfaceType(this IType) : bool |
Method | Added |
IsInlineArrayType(this IType) : bool |
Method | Added |
GetInlineArrayLength(this IType) : int? |
Method | Added |
GetInlineArrayElementType(this IType) : IType |
Method | Added |
IsDefaultValueAssignmentAllowed(this IParameter) : bool |
Method | Added |
ICSharpCode.Decompiler.Metadata.MetadataFile
| Member | Type | Operation |
|---|---|---|
MetadataFile(MetadataFileKind, string, MetadataReaderProvider, MetadataReaderOptions, int, bool) |
Constructor | Removed |
MetadataFile(MetadataFileKind, string, MetadataReaderProvider, MetadataReaderOptions, int, bool, MetadataStringDecoder?) |
Constructor | Added |
MetadataFile(MetadataFileKind, string, MetadataReader, int, bool) |
Constructor | Added |
ICSharpCode.Decompiler.Metadata.PEFile
| Member | Type | Operation |
|---|---|---|
PEFile(string, PEStreamOptions, MetadataReaderOptions) |
Constructor | Removed |
PEFile(string, Stream, PEStreamOptions, MetadataReaderOptions) |
Constructor | Removed |
PEFile(string, PEReader, MetadataReaderOptions) |
Constructor | Removed |
PEFile(string, PEStreamOptions, MetadataReaderOptions, MetadataStringDecoder?) |
Constructor | Added |
PEFile(string, Stream, PEStreamOptions, MetadataReaderOptions, MetadataStringDecoder?) |
Constructor | Added |
PEFile(string, PEReader, MetadataReaderOptions, MetadataStringDecoder?) |
Constructor | Added |
ICSharpCode.Decompiler.IL.OpCode
| Member | Type | Operation |
|---|---|---|
LdElemaInlineArray : OpCode |
Field | Added |
ICSharpCode.Decompiler.IL.Block
| Member | Type | Operation |
|---|---|---|
GetContainingStatement(ILInstruction) : ILInstruction? |
Method | Added |
ICSharpCode.Decompiler.IL.ILInstruction
| Member | Type | Operation |
|---|---|---|
Extract(ILTransformContext) : ILVariable |
Method | Removed |
MatchLdElemaInlineArray(out IType?, out ILInstruction?) : bool |
Method | Added |
Extract(ILTransformContext) : ILVariable? |
Method | Added |
ICSharpCode.Decompiler.CSharp.LanguageVersion
| Member | Type | Operation |
|---|---|---|
CSharp13_0 : LanguageVersion |
Field | Added |
ICSharpCode.Decompiler.CSharp.OutputVisitor.InsertParenthesesVisitor
| Member | Type | Operation |
|---|---|---|
VisitInterpolation(Interpolation) : void |
Method | Added |
ICSharpCode.Decompiler.CSharp.ProjectDecompiler.IProjectInfoProvider
| Member | Type | Operation |
|---|---|---|
CheckForOverflowUnderflow : bool |
Property | Added |
Added Types
ICSharpCode.Decompiler.IL.LdElemaInlineArray
| Member | Type | Operation |
|---|---|---|
ArraySlot : SlotInfo |
Property | Added |
IndicesSlot : SlotInfo |
Property | Added |
Type : IType |
Property | Added |
Array : ILInstruction |
Property | Added |
Indices : InstructionCollection<ILInstruction> |
Property | Added |
ResultType : StackType |
Property | Added |
IsReadOnly : bool |
Property | Added |
DirectFlags : InstructionFlags |
Property | Added |
LdElemaInlineArray(IType, ILInstruction, params ILInstruction[]) |
Constructor | Added |
Clone() : ILInstruction |
Method | Added |
WriteTo(ITextOutput, ILAstWritingOptions) : void |
Method | Added |
AcceptVisitor(ILVisitor) : void |
Method | Added |
AcceptVisitor<T>(ILVisitor<T>) : T |
Method | Added |
AcceptVisitor<C,T>(ILVisitor<C,T>, C) : T |
Method | Added |
ICSharpCode.Decompiler.CSharp.ProjectDecompiler.TargetFramework
| Member | Type | Operation |
|---|---|---|
Identifier : string |
Property | Added |
Moniker : string |
Property | Added |
VersionString : string |
Property | Added |
VersionNumber : int |
Property | Added |
Profile : string |
Property | Added |
IsPortableClassLibrary : bool |
Property | Added... |
ILSpy 9.1
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.x or later must be installed prior to starting ILSpy. Note that ILSpy 9.1 also allows a later runtime via #3391.
New Language Features
- Update pattern-detection to Roslyn 4.13
Enhancements
- #1572: Do not generate variable names that match C# keywords.
- #2716: Add an option to allow sorting custom attributes
- #3377: Extend error information if multiple assemblies with the same (short) name are selected when creating a solution file.
- #3393: Option to turn off smooth scrolling
- #3399: Add module filename as ToolTip of AnalyzerEntityTreeNode
- #3440: Added support for evaluation-order-preserving reference type check
- #3316: Add "variable scopes" to improve naming local variables and anonymous method parameters
Contributions
- Add support for array initialization based on
RuntimeHelpers.CreateSpan<T>(see #3380 by @ds5678) - Load resource stream outside of delegate (see #3389 by @snorrk)
- Allow ILSpy to launch, when net8.0 is not installed, but a later version (see #3391 by @nil4)
- Fix nested namespace directories (see #3449 by @ds5678)
- Fix #3402: System.NullReferenceException on right click on .NET 9 (see #3403 by @tom-englert)
- Add an option to turn off smooth scrolling (see #3405 by @tom-englert)
- Use type hint in pointer arithmetic (see #3413 by @ds5678)
- Improve UI for primary constructors on non-record types (see #3455 by @ds5678)
- Fix exception when writing resx files without adding any resources (see #3418 by @jwfx)
- Enhance null handling in switch transformations (see #3422 by @ds5678)
- Don't include generic constraints in generated explicit overrides (see #3443 by @ds5678)
- Improve generation of not equals check (see #3425 by @ElektroKill)
Bug fixes
- Fix #2269: LocalFunctionDecompiler misplaces nested local functions in ctors
- Fix #3322: Add missing checks for equality comparison
- Fix #3378: Navigation shortcuts (Alt-Left and Alt-Right) don't work when TreeView has focus
- Fix #3381: Make sure that selectedNode is still selected when focus is deferred in IsActive property changed handler.
- Fix #3383: more aggressively transform object initializers on structs
- Fix #3384: add special case for null-literal conversions in optional argument handling.
- Fix #3385: Allow address uses of structs in using transform, if the reference is passed to an in parameter.
- Fix #3392: uses of init-setters must use object-initializer syntax.
- Fix #3401: Multiple problems when exporting an assembly as project
- Fix #3414: Apply latest session settings before saving upon closing the main window
- Fix #3342: Wrong null check in MethodVirtualUsedByAnalyzer
- Fix #3450: Fix "Clear assembly list" not actually persistent.
- Fix #3432: Do not include delegate construction use-sites in DetermineCaptureAndDeclarationScopes.
- Fix attributes tooltip of GenericParam metadata table
And many other fixes, for a full list click here.
ILSpy 9.0
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.x or later must be installed prior to starting ILSpy.
Generic themes of this release were refactoring the old WPF code base and moving away from platform-dependent implementations to make reuse easier via our ILSpyX package.
A few notable picks from the "What's new" department for you to check out: WebCIL and standalone ECMA-335 metadata support, as well as diagramming (either via ilspycmd or assembly context menu). And in general quality-of-life improvements like the ability to disable automatic assembly loading, performance improvements via DATAS and future-proofing for .NET 10.
New Language Features
- Add support for C# 12 primary constructors.
- Add support for C# 12 'ref readonly' parameters
- Added support for switch on
(ReadOnly)Span<char>using a compiler-generated hash function. - Added new
a.GetValueOrDefault(b) -> a ?? btransform for side-effect-free default values. - Support types that provide DisposeAsync without implementing IAsyncDisposable.
- Updated pattern detection to Roslyn 4.12
Enhancements
- Added support for reading WebCIL assemblies (IL embedded in WASM) (see #3184)
- Added support for reading standalone ECMA-335 metadata (portable PDB and other metadata blobs) (see #3149)
- #3118: Add "Clear assembly list" menu item.
- #2893: Add option to disable automatic assembly loading.
- Allow implicit conversions in switch
- 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.
- Replace native interop CommandLineToArgvW with parsing in Process.Unix.cs from System.Diagnostics.Process #3201
- Natural Sort without interop #3196
- AOT and x-plat changes #3203
- Allow running tests on ARM64 (see #3231)
- Alow collecting analyzers annotated with
ExportAnalyzerAttribute(see #3239) - Fix #3237: Use ref readonly locals for
readonly.ldelema - Fix #3001: Support new resources format in ResourcesFile/ResXResourceWriter
- Fix #3134: Include
newobj,initobjandcallinstructions inTypeInstantiatedByAnalyzer - Fix #3089: Add comment regarding .constraint prefix expressed as cast in C#
- Fix #3372: Fix loading a DLL that contains byte sequences matching ZIP central directory
- Use Microsoft.Sbom.Targets in NuGets #3346
Contributions
- Diagramming feature by @h0lg (see #3324)
- Various WPF-related refactorings by @tom-englert (see #3257, #3266, #3274, #3283, #3285, #3291, #3292, #3294, #3295, #3297, #3298, #3299, #3302, #3308, #3314, #3325 and #3335)
- High DPI fixes by @CreateAndInject (see #3348 and #3350)
- TreeView: Add referenced types, members and exported types under references (#3092, @fowl2)
- Adjust colors of AvalonEdit built-in highlightings for dark themes (#3138, @ltrzesniewski)
- Add support for
Mono C# compiler 2.6.4pinned region with array variable (#3110, @ElektroKill) - Add smooth scrolling to settings panels and DecompilerTextView (see #3244 by @tom-englert)
- Ignore empty version directories of dotnet (#3265 by @Herrmel)
- Missing DecompilerSettings by @naratteu (see #3356)
- Fix metadata display of
DynamicLocalVariableandDefaultNamespacecustom debug information (#3111, @ElektroKill) - Read and use tuple element names and dynamic type information from PDBs (#3114, @ElektroKill)
- Bugfix: infinite loop in
DetermineEffectiveAccessibility(#3164, @yzdeveloper) - Decompiler Settings: Checkbox in group header does not reflect state of the group (see #3252 by @tom-englert)
- Fix Derived Types Node always being empty (#3280 by @Applesauce314)
Performance
- Activate Dynamic Adaptation To Application Sizes (DATAS) (#3122).
- RDP hardware acceleration (#3122): Enabling hardware acceleration for Remote Desktop Protocol (RDP) to boost performance.
- Performance: Initialize ToolPanes in
DockWorkspace.InitializeLayout()instead of the property getter to avoid WPF seeing them inInitializeComponent()and rendering all panes docked at the right before the layout is properly initialized.
Breaking Changes
- ICSharpCode.Decompiler: Added
MetadataFilebase class forPEFile - ICSharpCode.Decompiler:
IModule.PEFileis now namedIModule.MetadataFile - ICSharpCode.Decompiler/ILSpyX: Added
IFileLoaderAPI 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:
IProjectFileWriterandIProjectInfoProviderAPIs are now public (see #3151 and #3191) @filesupport with breaking changes to command line options #3205- New single instance handling #3212
- Remove
IsRef,IsOutandIsInflags fromIParameter - Replace
ParameterModifierswithReferenceKind.
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.
- Fix #3197: Bug when trying to read a bundle/archive file
- Fix #3189: Support primitive types in Expression.Constant(object) pattern in Expression Trees
- Fix #3209: Ensure using directives are added for extension methods in higher level patterns such as: foreach ->
GetEnumerator(), collection initializer ->Add()and deconstruction ->Deconstruct(). - Fix #3255: Ignore exceptions while decoding sequence point blobs.
- Fix #2166: Unnecessary uint casts/conversions for certain bitwise operations
- Fix #3310: Filter out copy-constructor only if it's an actual record type.
- Fix #3319: KeyDownEvent field reference was replaced with KeyDown event reference.
- Fix #3349: Make ILSpy ready for .NET 10
- Fix #3361: switch-value conversion was losing its target type.
And many other fixes, for a full list click here.
ILSpy 9.0 Release Candidate
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.
New Language Features
- Updated pattern detection to Roslyn 4.12
Contributions
- Diagramming feature by @h0lg (see #3324)
- More WPF-related refactorings by @tom-englert (see #3325 and #3335)
- High DPI fixes by @CreateAndInject (see #3348 and #3350)
- Missing DecompilerSettings by @naratteu (see #3356)
Enhancements
- Allow implicit conversions in switch
Performance
- Performance: Initialize ToolPanes in
DockWorkspace.InitializeLayout()instead of the property getter to avoid WPF seeing them inInitializeComponent()and rendering all panes docked at the right before the layout is properly initialized.
Bug fixes
- Fix #3319: KeyDownEvent field reference was replaced with KeyDown event reference.
- Fix #3349: Make ILSpy ready for .NET 10
- Fix #3361: switch-value conversion was losing its target type.
And many other fixes, for a full list click here.
ILSpy 9.0 Preview 3
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 must be installed prior to starting ILSpy.
Breaking Changes in ICSharpCode.Decompiler
- Remove
IsRef,IsOutandIsInflags fromIParameter - Replace
ParameterModifierswithReferenceKind.
New Language Features
- Update pattern detection to Roslyn 4.11.0
- Support types that provide DisposeAsync without implementing IAsyncDisposable.
- Add support for C# 12 primary constructors.
- Add support for C# 12 'ref readonly' parameters
Contributions
- Add smooth scrolling to settings panels and DecompilerTextView (see #3244 by @tom-englert)
- Decompiler Settings: Checkbox in group header does not reflect state of the group (see #3252 by @tom-englert)
- Various WPF-related refactorings by @tom-englert (see #3257, #3266, #3274, #3283, #3285, #3291, #3292, #3294, #3295, #3297, #3298, #3299, #3302, #3308 and #3314)
- Ignore empty version directories of dotnet (#3265 by @Herrmel)
- Fix Derived Types Node always being empty (#3280 by @Applesauce314)
Enhancements
- Allow running tests on ARM64 (see #3231)
- Alow collecting analyzers annotated with
ExportAnalyzerAttribute(see #3239) - Fix #3237: Use ref readonly locals for
readonly.ldelema - Fix #3001: Support new resources format in ResourcesFile/ResXResourceWriter
- Fix #3134: Include
newobj,initobjandcallinstructions inTypeInstantiatedByAnalyzer - Fix #3089: Add comment regarding .constraint prefix expressed as cast in C#
Bug fixes
- Fix #3209: Ensure using directives are added for extension methods in higher level patterns such as: foreach ->
GetEnumerator(), collection initializer ->Add()and deconstruction ->Deconstruct(). - Fix #3255: Ignore exceptions while decoding sequence point blobs.
- Fix #2166: Unnecessary uint casts/conversions for certain bitwise operations
- Fix #3310: Filter out copy-constructor only if it's an actual record type.
And many other fixes, for a full list click here.
ILSpy 9.0 Preview 2
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
@filesupport with breaking changes to command line options #3205- New single instance handling #3212
Enhancements
- Replace native interop CommandLineToArgvW with parsing in Process.Unix.cs from System.Diagnostics.Process #3201
- Natural Sort without interop #3196
- AOT and x-plat changes #3203
Bug fixes
ILSpy 9.0 Preview 1
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
MetadataFilebase class forPEFile - ICSharpCode.Decompiler:
IModule.PEFileis now namedIModule.MetadataFile - ICSharpCode.Decompiler/ILSpyX: Added
IFileLoaderAPI 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:
IProjectFileWriterandIProjectInfoProviderAPIs 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 ?? btransform 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
DynamicLocalVariableandDefaultNamespacecustom 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.4pinned 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.
ILSpy 8.2
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
notpatterns - 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_PACKAGESenvironment 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 byConditionDetection. - #3075: Add
NextSetBitoperation toBitSetto avoid looking at every store bit individually inReachingDefinitionsVisitor.GetStores() - #3075: Fix
ILVariableEqualityComparer.GetHashCode - #3075: Improve performance of
CSharpResolver.LookupSimpleNameOrTypeNamein 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
StringBuilderwhen 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
Addwere skipping some checks inAccessPathElement.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.
ILSpy 8.1.1
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 v8.1...v8.1.1