title: Open Emitted assembly generated code appears empty in Reflector when it is not.
body: <p>I'm generating a dynamic assembly using Reflection.Emit which includes a single class. I have a bug which is causing a BadImageException. To resolve this I need to see the compiled code, and therefore I'm saving the dynamic assembly to disk.</p>
  
  <p>I've already tried PEVerify against the assembly which seems to think there are no errors. I now want to view the generated code in Reflector, but the assembly appears as empty (which I know it's not).</p>
  
  <p>Any idea why this is happening?</p>
  
  <pre><code>var assemblyName = new AssemblyName("An.Assembly");
  var appDomain = Thread.GetDomain();
  var assemblyBuilder = appDomain.DefineDynamicAssembly(assemblyName, AssemblyBuilderAccess.RunAndSave);
  var moduleBuilder = assemblyBuilder.DefineDynamicModule(assemblyName.Name);
  var typeBuilder = moduleBuilder.DefineType("MyClass", TypeAttributes.Public | TypeAttributes.Class);
  ... 
  typeBuilder.CreateType();
  assemblyBuilder.Save("temp.dll");
  </code></pre>
  
  <p>By the way I'm already using the <code>Relection.Emit</code> plugin for reflector which doesn't help with this issue.</p>