When a project reference is added everything works fine. So I removed the reference and copied the runtime component winmd file to another location, and then added a reference to that. It all compiles and I see the runtime component winmd and
pri file in the output folder, but when I run the app I get error 0x80040154 (class not registered). I also included the DLL as a content type but that didn't resolve the issue.

Sorry it all wasn't clear. In my app I want to add a reference to a Windows runtime component (written in C++) but I don't want to add it via a project reference. So I'm trying to find out how I go about adding it directly hence I tried
adding a reference to the winmd file.

Since my last post I've been doing some digging and have found that Visual studio behaves differently in the two scenarios:

when the app is configured with a project reference visual studio adds an entry under HKCU\Software\Classes\ActivatableClasses\Package\{my package guid}\ActivatableClassId\{MyRuntimeComponent}

when the app is configured with a direct reference to the winmd file visual studio doesn't add the entry so GetFactory (within vcwinrt.cpp) fails.