I know I can use CORFLAGS to force a .NET assembly to 32-bits. How can I do it when I am using reflection to create the assembly in the first place? There seems to be a function to get the value ( http://msdn.microsoft.com/en-us/library/system.reflection.module.getpekind.aspx )
If you're asking how to set this for a dynamic assembly generated using AssemblyBuilder
, then you can use an overload of AssemblyBuilder.Save()
that lets you specify this.