介绍
尽管有许多类似的工具可供使用,但 ILSpy 非常易于使用以及免费和开源。它不需要任何安装,这意味着它可以保存到您的便携式应用程序集合中,复制到 USB 闪存驱动器,并且可以在任何PC上使用而无需设置来浏览和检查 .NET 程序集。
软件截图
软件特点
使用此工具仔细查看.NET程序集
主应用程序窗口具有清晰的布局,分为两个主窗格:用于浏览 .NET 程序集树以及仔细查看任何选定项目。它可以检查 DLL,EXE 和 WINMD 文件(Windows 元数据)。可以从 GAC 加载数据,也可以打开 Nuget 包。
ILSpy 能够使用 C# 在 C#,IL 和 IL 中呈现代码。对于 C#,您可以选择 C#1.0/VS .NET 到 C#7.2/VS 2017。例如,您可以查看资源和引用,查看表以及将信息提取到文件。
使用 C# 在 C#,IL 和 IL 中呈现代码
由于该程序仅用于查看目的,因此无法进行文件修改。另一方面,您可以在查找类型,成员,方法,字段,属性,事件,常量或元数据标记时利用搜索功能。
可以配置多个反编译器设置,例如使用调试符号中的变量名称,删除无死区和副作用的代码,或者在反编译后扩展成员定义。此外,您可以自定义字体并允许多个实例。
考虑到所有方面,IlSpy 尽可能简单地反编译 .NET 程序集,看看是什么让软件变得简单。由于它是开源的,开发人员可以随意修改和使用其代码。
更新日志
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)
- Added support for reading standalone ECMA-335 metadata (portable PDB and other metadata blobs)
- #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
- Natural Sort without interop
- AOT and x-plat changes
- Allow running tests on ARM64
- Alow collecting analyzers annotated with
ExportAnalyzerAttribute
- Fix #3237: Use ref readonly locals for
readonly.ldelema
- Fix #3001: Support new resources format in ResourcesFile/ResXResourceWriter
- Fix #3134: Include
newobj
,initobj
andcall
instructions 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