http://pastebin.com/n6G1jTHQ
My code creates a new assembly and module, and then emits a class SWT
(within a new assembly) that should be exactly the same as SWTTFields
class.
Line 137, saves the assembly/module into a .dll
, myAsmBuilder.Save("ModuleOne.dll");
throws the exception:
An unhandled exception of type 'System.NotSupportedException' occurred in mscorlib.dll Additional information: Type 'SWT' was not completed.
Why I am getting this error ? What is missing in my emitted class ?
You have to call the TypeBuilder.CreateType Method for each TypeBuilder before saving the File.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With