title: Automatic conversion of winmd to DLL
body: <p>I'd like to create a tool that accepts a .<code>winmd</code> file (Windows Runtime Component) and generates a C# DLL out of it (containing all the public types defined in the component).</p>
  
  <p>As far as I've learned, standard .NET Reflection APIs cannot work on .winmd files, and one must used the <a href="http://msdn.microsoft.com/en-us/library/ms404384.aspx" rel="nofollow">Metadata Unmanaged APIs</a> to access that information.</p>
  
  <p>The question is -- is it possible to construct a C# assembly out of the information that is retrieved from the Metadata API? </p>
  
  <p>Or better yet -- is there a tool (like TLBIMP) that already does this job or something similar?</p>