Reputation: 344
This question is based in (ILSpy, how to resolve dependencies?)
Well, the ILSpy library changed and now we don't have Ast Builder, like the most answers about this.
The instance new ICSharpDecompiler
have a overload that can take a ModuleDefinition
of Mono.Cecil
, but I don't know if this ModuleDefinition is the new "Resolver" for this issue.
In the resume I need to decompile a assembly (C#, .dll) that I don't have the dependecies (dll), I need to read the assembly using CSharpDecompiler decompiler = new CSharpDecompiler(dll.Name + ".dll", new DecompilerSettings());
without have the dependencies, how can I do that?
Upvotes: 1
Views: 581
Reputation: 344
I got the solution making a simple:
CSharpDecompiler decompiler = new CSharpDecompiler("name.dll", new DecompilerSettings() {ThrowOnAssemblyResolveErrors = false})
This will ignore the dependencies but the types with references will not be read.
Upvotes: 3