Are .winmd files required at run-time or just at build time

189 Views Asked by At

I have written a Windows App SDK based library using C++/WinRT. When I build that library, I get a dll with and an associated winmd file that describes the types stored in my dll. I then consume that library in a Windows App SDK based app project and things work the way I expect.

But when I compile the app project, both the dll and the winmd file of the library are packaged. My understanding is that the winmd file is required at build time to enable external code to interface with the library. But the packaging seems to imply that the winmd file is also required when the app is running.

Is that the case? Are winmd files required when just running an app?

1

There are 1 best solutions below

0
YangXiaoPo-MSFT On

According to Windows Metadata (WinMD) files, these metadata files are used by tools and language projections in order to enable language projection and language projections in the resolution of namespaces and types which need this metadata can be at runtime, compile time or both. As far as runtime concerned, Windows provides APIs to aid this.