ILSpy on .net Compact Framework

时间:2016-06-24 09:37:56

标签: compact-framework ilspy

在ILSpy版本2.3.1.1855中,我尝试反编译System.dll(以解决HttpWebRequest的问题)。这个dll在C:\Program Files (x86)\Microsoft.NET\SDK\CompactFramework\v3.5\WindowsCE。我得到了类型和成员的列表,但没有代码。相反,此异常显示在ILSpy代码窗口中:

  

ICSharpCode.Decompiler.DecompilerException:错误反编译System.Net.WebResponse System.Net.WebRequest :: GetResponse()    ---> System.OverflowException:数组维度超出支持的范围。      at ICSharpCode.Decompiler.ILAst.ILAstBuilder.StackSlot.ModifyStack(StackSlot [] stack,Int32 popCount,Int32 pushCount,ByteCode pushDefinition)      at ICSharpCode.Decompiler.ILAst.ILAstBuilder.StackAnalysis(MethodDefinition methodDef)      at ICSharpCode.Decompiler.ILAst.ILAstBuilder.Build(MethodDefinition methodDef,Boolean optimize,DecompilerContext context)      在ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1参数)      at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDefinition methodDef,DecompilerContext context,IEnumerable`1 parameters)      ---内部异常堆栈跟踪结束---      at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDefinition methodDef,DecompilerContext context,IEnumerable`1 parameters)      在ICSharpCode.Decompiler.Ast.AstBuilder.CreateMethod(MethodDefinition methodDef)      在ICSharpCode.Decompiler.Ast.AstBuilder.AddMethod(MethodDefinition方法)      在ICSharpCode.ILSpy.CSharpLanguage.DecompileMethod(MethodDefinition方法,ITextOutput输出,DecompilationOptions选项)      at ICSharpCode.ILSpy.TextView.DecompilerTextView.DecompileNodes(DecompilationContext context,ITextOutput textOutput)      在ICSharpCode.ILSpy.TextView.DecompilerTextView。<> c__DisplayClass16.b__15()

任何提示?

1 个答案:

答案 0 :(得分:2)

那些只是存根。您需要反编译实际的BCL库,例如:

C:\Program Files (x86)\Microsoft.NET\SDK\CompactFramework\v3.5\Debugger\BCL\System.dll