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
WinMDs are metadata only assemblies. Using ReflectionOnlyLoadFrom should do the trick.
The following code works.
var assembly = System.Reflection.Assembly.ReflectionOnlyLoadFrom(winmdPath);
foreach (var type in assembly.GetTypes())
{
Console.WriteLine("type found name = " + type.Name);
}