Building Windows Runtime Components

After removing the Random property, we can compile our component, resulting in a WINMD file, as shown in Figure 32.18.

Image

FIGURE 32.18 Our WinRT component’s WINMD file.

Just like all the Windows APIs for Windows Store applications are described in a Windows Metadata (WINMD) file, our own component is turned into such a file. Under the hood, the compilation process consists of two steps. First, the C# compiler kicks in to compile our code. But instead of writing the result to a .dll file, it emits a .winmdobj file by running with the /t:winmdobj flag. Next, the WinMdExp.exe tool from the Windows SDK is called to ...

Get C# 5.0 Unleashed now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.