这是我的代码,我想要实现的是反编译程序集。但是,当我开始这样做时,它会引发异常
Failed to resolve assembly: 'ICSharpCode.AvalonEdit, Version=5.0.3.0, Culture=neutral, PublicKeyToken=9cc39be672370310'
我想这意味着反编译器无法找到该程序集的其他依赖项。那么,是否有任何方法可以跳过查找其他依赖项但只是反编译代码?或者,如果有任何方法可以将其他依赖项放入反编译过程中?请帮忙!
foreach(var types in myASB.MainModule.Types)
{
Console.WriteLine(types.Name);
AstBuilder astBuilder = new AstBuilder(new DecompilerContext(myASB.MainModule)
{
CurrentType = types,
});
astBuilder.AddType(types);
var writeText = new PlainTextOutput();
astBuilder.GenerateCode(writeText);
Files.WriteFileContent(Path.Combine(Directory.GetCurrentDirectory() + "/Code", Files.getSafeFileNameString(types.Name) + ".cs"), writeText.ToString());
}