Emitting Resources with Reflection Emit

Standalone managed resources are emitted using the AssemblyBuilder.DefineResource method or the ModuleBuilder.DefineResource method. These methods return an IResourceWriter, whose methods can be called to emit fine grain resources. See the System.Resources namespace overview for a description of fine grain resources and the IResourceWriter interface. Existing managed resource files can be added to a dynamic assembly using AssemblyBuilder.AddResourceFile.

An unmanaged resource file or an unmanaged resource blob can be added to a dynamic assembly using AssemblyBuilder.DefineUnmanagedResource. Unmanaged resources are restricted to one file or blob per assembly.

An unmanaged version information resource can be added to a dynamic assembly using the AssemblyBuilder.DefineVersionInfoResource method. DefineVersionInfoResource builds a version information resource using the values of the AssemblyName properties.

See Also

Using Reflection Emit