ILSpycmd 手册
# ilspycmd
```
dotnet tool install ilspycmd -g
```
.NET Core 3.1 and .NET 6.0 Tool
```
ilspycmd -h
ilspycmd: 7.2.0.0
ICSharpCode.Decompiler: 7.2.0.6768
dotnet tool for decompiling .NET assemblies and generating portable PDBs
Usage: ilspycmd [options] <Assembly file name>
Arguments:
Assembly file name The assembly that is being decompiled. This argument is mandatory.
Options:
-v|--version Show version information.
-h|--help Show help information.
-o|--outputdir <directory> The output directory, if omitted decompiler output is written to standard out. 如果省略了输出目录,反编译器输出将写入标准输出。
-p|--project Decompile assembly as compilable project. This requires the output directory option. 将程序集反编译为可编译项目。这需要输出目录选项。
-t|--type <type-name> The fully qualified name of the type to decompile. 要反编译的类型的完全限定名。
-il|--ilcode Show IL code. 显示IL代码
--il-sequence-points Show IL with sequence points. Implies -il. 用序列点显示IL
-genpdb|--generate-pdb Generate PDB.
-usepdb|--use-varnames-from-pdb Use variable names from PDB. 使用PDB中的变量名
-l|--list <entity-type(s)> Lists all entities of the specified type(s). Valid types: c(lass), i(nterface), 列出指定类型的所有实体
s(truct), d(elegate), e(num)
-lv|--languageversion <version> C# Language version: CSharp1, CSharp2, CSharp3, CSharp4, CSharp5, CSharp6, CSharp7_0, C语言版本:
CSharp7_1, CSharp7_2, CSharp7_3, CSharp8_0, CSharp9_0, CSharp_10_0 or Latest
-r|--referencepath <path> Path to a directory containing dependencies of the assembly that is being decompiled. 包含正在反编译的程序集的依赖项的目录的路径
--no-dead-code Remove dead code. 删除死代码。
--no-dead-stores Remove dead stores. 移除废弃的仓库。
-d|--dump-package Dump package assembiles into a folder. This requires the output directory option. 将包assembiles转储到文件夹中。这需要输出目录选项
Remarks:
-o is valid with every option and required when using -p.
```