Hello,
Welcome to Microsoft Q&A.
It is not supported to test a C++/WinRT library(whichever the project is a C++ DLL(Universal Windows) project or a C++ Static Library(Universal Windows) project) in a C++ console application. The compiler will tell you that a reference to your library cannot be added to a console application because the two projects target different platforms.
We suggest you use a UWP app to test your winrt library. You could refer to the document to learn how to add a reference to your c++/winrt library project from a UWP app(including Blank App(C++/WinRT) project and Core App(C++/WinRT) project).
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.