【问题标题】:Error decompiling .dll with .NET Reflector with FileDisassembler使用 FileDisassembler 使用 .NET Reflector 反编译 .dll 时出错
【发布时间】:2016-01-28 21:56:10
【问题描述】:

我继承了管理使用编译代码工作的网站的责任。我需要对代码进行一些更改,但似乎所有 .cs 文件都已删除,我不知道是否有备份,所以我求助于使用带有 .NET Reflector 的文件分解器插件。文件反汇编程序会吐出所有名称正确的 cs 文件,但在检查它们时,所有文件都有相同的错误并被截断。

System.IndexOutOfRangeException: Index was outside the bounds of the array.
   at System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous)
   at System.Windows.Forms.Control.Invoke(Delegate method, Object[] args)
   at ...Resolve(IAssemblyReference assemblyReference, String localPath)
   at Reflector.FileDisassembler.FileDisassemblerHelper.AssemblyResolver.Resolve(IAssemblyReference assemblyName, String localPath)
   at ..Load(IAssemblyReference assemblyReference, String localPath)
   at Reflector.CodeModel.Memory.AssemblyReference.Resolve()
   at .....ctor(ICollection namespaces, INamespace namespaceDeclaration)
   at ...WriteNamespace(INamespace value)
   at Reflector.FileDisassembler.FileDisassemblerHelper.WriteTypeDeclaration(ITypeDeclaration typeDeclaration, ILanguageWriterConfiguration configuration)

这个错误似乎会阻止 .NET 反射器反编译其余的 cs 文件。我该如何克服这个问题?

【问题讨论】:

    标签: c# asp.net .net-reflector


    【解决方案1】:

    当我处于相同情况时,我使用了https://github.com/0xd4d/dnSpy。它允许动态修补DLL。

    【讨论】:

    • 该 dll 仅包含 //dll 的位置 // App_Code.dll // 全局类型: // 架构:AnyCPU(首选 64 位) // 运行时:.NET 2.0 //时间戳:55440F1A (2015-05-01 23:41:14) 使用系统;我需要编辑构成 app-code.dll 的 cs 文件,你知道我该怎么做吗? **Nvm,我只需要将其导出为 Visual Studio 解决方案。谢谢
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2019-01-08
    • 1970-01-01
    • 2020-09-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-04-05
    相关资源
    最近更新 更多