首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >C#命令行反编译器

C#命令行反编译器
EN

Stack Overflow用户
提问于 2011-11-12 05:05:04
回答 2查看 3K关注 0票数 5

我希望将大量的程序集反编译成C#。我发现了几个可以进行可视化反编译的工具。然而,我想知道是否有一个工具可以从命令行进行反编译(类似于ildasm /OUT)。

其动机是存在程序集的100+,我不想打开每个程序集并将其另存为.cs文件。.NET Reflector似乎有一个批量加载的程序集,但它没有批量保存。因此,我正在考虑编写一个脚本,它遍历每个程序集,并使用命令行命令对其进行反编译。

EN

回答 2

Stack Overflow用户

发布于 2011-11-12 05:12:28

如果你正在寻找一个为程序集生成C#代码的程序,Jon Gallant最近有一篇博客文章介绍了如何使用Telerik的JustDecompile来实现这一点。您可以链接到几个程序集,然后可以在没有UI的情况下控制代码的生成。

票数 2
EN

Stack Overflow用户

发布于 2020-05-10 21:47:18

您唯一需要的就是这个名为dnSpy -> https://github.com/0xd4d/dnSpy的开源反编译器

包括命令行工具:

代码语言:javascript
复制
Examples:
  dnSpy.Console.exe -o C:\out\path C:\some\path
      Decompiles all .NET files in the above directory and saves files to C:\out\path
  dnSpy.Console.exe -o C:\out\path -r C:\some\path
      Decompiles all .NET files in the above directory and all sub directories
  dnSpy.Console.exe -o C:\out\path C:\some\path\*.dll
      Decompiles all *.dll .NET files in the above directory and saves files to C:\out\path
  dnSpy.Console.exe --md 0x06000123 file.dll
      Decompiles the member with token 0x06000123
  dnSpy.Console.exe -t system.int32 --gac-file "mscorlib, Version=4.0.0.0"
      Decompiles System.Int32 from mscorlib
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/8099966

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档