There are loads of tutorials on how to create a WinRT Component DLL in C++ but there aren’t many on how to do this with C#. In fact it is pretty simple:
Step 1: Add a C# Class library project to your solution
Step 2: Right click on the new project you have just added and go to properties.
Step 3: Change the output type from ‘Class Library’ to ‘WinMD File’.
Step 4: Ensure your class inside the newly created Class Library is sealed. The Windows Runtime classes you create must be sealed.