Hi Daniel,
When we decompile code from assembly using example given by you:
AssemblyDefinition assembly = AssemblyDefinition.ReadAssembly(fileName);
AstBuilder decompiler = new AstBuilder(new DecompilerContext(assembly.MainModule));
decompiler.AddAssembly(assembly);
StringWriter output = new StringWriter();
decompiler.GenerateCode(new PlainTextOutput(output));
we get code in the format where all the "using" statements are at top of file and the classes are placed appropriately.
This is problem for me. I need to know the full namespace path to a class/struct/enum etc. after decompilation. So, instead of having all the namespaces in "using" block, is there an option to write full class path for each object?
Example of desired output:
class TestApp {public class System { }const int Console = 7;const int number = 66;static void Main() {global::System.Console.WriteLine(number); }
}