You don't need to "create" a PE file. It is always created as soon as your compilation is successful. Perhaps you may only need to copy it from the temporary location. Where is it? Here:
http://msdn.microsoft.com/en-us/library/system.codedom.compiler.compilerresults.pathtoassembly.aspx[
^].
Some background: it's actually easy to check up that existing CodeDOM providers are based on the compilers which are bundled with the (freely redistributed) .NET Framework: VB.NET and C#. These compilers actually have no notion of CodeDOM (and that's why CodeDOM functionality is currently limited: if you try to get a DOM tree from source, you will get a "not supported" messages). But this reason, compilation always make PE files from source files, nothing else, there is no a compilation into memory or parsing to the DOM tree. Instead, CodeDOM for these providers is simply implementing as the wrappers over the compilers. When you need a compilation into an assembly loaded in memory, you actually get a PE file, and then the assembly is loaded from it in a usual way. So, you always have some PE file on output in case of successful compilation.
—SA