ITADN

版本发布 8

ILSpy 10.0 Preview 2v10.0-preview2
? · 2025-12-30

This preview release is based on [.NET 10.0](https://dotnet.microsoft.com/en-us/download/dotnet/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 struct` constraint * C# 14: `extension` members # Enhancements * `CSharpConversions`: General improvements, fixing various missing rules for C# up to version 9. * #3344: Support `ckfinite` IL 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 struct` constraint (see #3537 by @jjonescz) * Allow passing an `IDecompilerTypeSystem` rather than a `DecompilerTypeSystem` to `CSharpDecompiler` (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 `ResolvedUsingScope` to `UsingScope` * Removed legacy `ToTypeReference` * Removed `ITypeReference` and 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 `FixLoneIsInst` with 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 `UseRefLocalsForAccurateOrderOfEvaluation` is 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](https://github.com/icsharpcode/ILSpy/compare/v10.0-preview1...v10.0-preview2).

ILSpy 9.1v9.1
? · 2025-04-22

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](https://dotnet.microsoft.com/en-us/download/dotnet/8.0) 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](https://github.com/icsharpcode/ILSpy/compare/v9.0...v9.1).

ILSpy 9.0v9.0
? · 2025-01-19

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](https://dotnet.microsoft.com/en-us/download/dotnet/8.0) 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 ?? b` transform 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`, `initobj` and `call` instructions in `TypeInstantiatedByAnalyzer` * 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](https://github.com/icsharpcode/ILSpy/wiki/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.4` pinned 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 `DynamicLocalVariable` and `DefaultNamespace` custom 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 in `InitializeComponent()` and rendering all panes docked at the right before the layout is properly initialized. # 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) * `@file` support with breaking changes to command line options #3205 * New single instance handling #3212 * Remove `IsRef`, `IsOut` and `IsIn` flags from `IParameter` * Replace `ParameterModifiers` with `ReferenceKind`. # 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](https://github.com/icsharpcode/ILSpy/compare/v8.2...v9.0).

ILSpy 9.0 Release Candidatev9.0-rc
? · 2025-01-06

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](https://dotnet.microsoft.com/en-us/download/dotnet/8.0) must be installed prior to starting ILSpy. # New Language Features * Updated pattern detection to Roslyn 4.12 # Contributions * [Diagramming](https://github.com/icsharpcode/ILSpy/wiki/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 in `InitializeComponent()` 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](https://github.com/icsharpcode/ILSpy/compare/v9.0-preview2...v9.0-preview3).

ILSpy 9.0 Preview 3v9.0-preview3
? · 2024-11-10

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](https://dotnet.microsoft.com/en-us/download/dotnet/8.0) must be installed prior to starting ILSpy. # Breaking Changes in `ICSharpCode.Decompiler` * Remove `IsRef`, `IsOut` and `IsIn` flags from `IParameter` * Replace `ParameterModifiers` with `ReferenceKind`. # 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`, `initobj` and `call` instructions in `TypeInstantiatedByAnalyzer` * 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](https://github.com/icsharpcode/ILSpy/compare/v9.0-preview2...v9.0-preview3).

ILSpy 9.0 Preview 2v9.0-preview2
? · 2024-06-09

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](https://dotnet.microsoft.com/en-us/download/dotnet/8.0) must be installed prior to starting ILSpy. # Breaking Changes * @file support 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 * Fix #3197: Bug when trying to read a bundle/archive file * Fix #3189: Support primitive types in Expression.Constant(object) pattern in Expression Trees

ILSpy 9.0 Preview 1v9.0-preview1
? · 2024-04-01

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](https://dotnet.microsoft.com/en-us/download/dotnet/8.0) 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): Enhancing responsiveness based on application window sizes (#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 intentation 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. This aligns with ECMA-335 guidelines for file content verification. * 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](https://github.com/icsharpcode/ILSpy/compare/v8.2...v9.0-preview1).

ILSpy 8.2v8.2
? · 2023-11-06

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](https://dotnet.microsoft.com/en-us/download/dotnet/6.0) 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&lt;byte&gt; (@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](https://github.com/icsharpcode/ILSpy/compare/v8.1.1...v8.2).