How to use Mono.Cecil to create HelloWorld.exe
How do you use Mono.Cecil to create a simple program from scratch? All the examples and tutorials I've been able to find so far, assume you are working with an existing assembly, reading or making small changes. See the following code to get you started: var myHelloWorldApp = AssemblyDefinition.CreateAssembly( new AssemblyNameDefinition("HelloWorld", new Version(1, 0, 0, 0)), "HelloWorld", ModuleKind.Console); var module = myHelloWorldApp.MainModule; // create the program type and add it to the module var programType = new TypeDefinition("HelloWorld", "Program", Mono.Cecil.TypeAttributes.Class