title: Cannot get types from .winmd file
body: <p>I want to output the types in a .winmd file given its path.
  I copied a winmd file from my Windows 8 Developer Preview machine to my dev machine.
  I wrote a small test app (in C#, .NET 4.0, not 4.5) which tries to load an assembly at run time, given its path, and outputs the types in it.
  Though the assembly was loaded, an exception occurred when I tried to get the types.</p>
  
  <p>Here is the code:</p>
  
  <pre><code>static void Main(string[] args)
  {
       if (args.Length != 1) return;
  
      var path = args[0];
      if (!System.IO.File.Exists(path))
      {
          Console.WriteLine("file not found : " + path);
          return;
      }
  
      var asm = System.Reflection.Assembly.LoadFrom(path);    // load successful.
  
      Console.WriteLine("loaded ");
      string name = asm.GetName().Name;
      Console.WriteLine(name);
  
      System.Type[] types = asm.GetTypes();   // exception occurs here
  
      foreach(var type in types)
      {
          // output type name
      }
  }
  </code></pre>
  
  <p>The exception is of type ReflectionTypeLoadException. Its Message property is: <em>Unable to load one or more of the requested types. Retrieve the LoaderExceptions
  property for more information.</em> </p>
  
  <p>The LoaderExceptions property that has the underlying exception, a TypeLoadException. Its Message property reads:
  <em>Bad use of Runtime Impl attribute.</em></p>
  
  <p>Anybody knows why I cannot read the types?</p>
  
  <p>Thanks.</p>
  
  <p>Note: I know I am using .NET 4.0. But, in .NET 4.5 (the one in the Windows 8 preview), I could not load an assembly from file at run time. There is no method in the Assembly class that does it.</p>