dnlib icon indicating copy to clipboard operation
dnlib copied to clipboard

Module to ModuleDefMD

Open Ambal2221 opened this issue 6 years ago • 2 comments

Hello, now another question. How can I convert a module (System.Reflection.Module) to ModuleDefMD, or Assembly (System.Reflection.Assembly) to AssemblyDefMD? I'm trying to take it from CompiledAssembly, this is example: Module module = results.CompiledAssembly.GetModules()[0];

Ambal2221 avatar Jul 01 '20 14:07 Ambal2221

Did you try something like: ModuleDefMD.Load(typeof(int).Module)

ghost avatar Jul 02 '20 18:07 ghost

Did you try something like: ModuleDefMD.Load(typeof(int).Module)

Thanks, it works

Ambal2221 avatar Jul 02 '20 20:07 Ambal2221