In this case, the symptom is that—when constructing a runtime class or accessing a static member—you see an exception thrown at runtime with a HRESULT value of REGDB_E_CLASSNOTREGISTERED.
One cause can be that your Windows Runtime component can't be loaded. Make sure that the component's Windows Runtime metadata file (.winmd) has the same name as the component binary (the .dll), which is also the name of the project and the name of the root namespace. Also make sure that the Windows Runtime metadata and the binary have been corectly copied by the build process to the consuming app's Appx folder. And confirm that the consuming app's AppxManifest.xml (also in the Appx folder) contains an element correctly declaring the activatable class and the binary name.
Uniform construction
This error can also happen if you try to instantiate a locally-implemented runtime class via any of the projected type's constructors (other than its std::nullptr_t constructor). To do that, you'll need the C++/WinRT 2.0 feature that's often called uniform construction. If you want to opt in to that feature, then for more info, and code examples, see Opt in to uniform construction, and direct implementation access.
For a way of instantiating your locally-implemented runtime classes that doesn't require uniform construction, see XAML controls; bind to a C++/WinRT property.