I have a Windows Phone 8.1 solution with the following projects:
I'm trying to compile the PCL and WinRT to a .nuget Package, and I know I can do that with the PCL, however, I'm missing something in the WinRT.
To test it manually, I'm removing projects from the solution and adding their build as reference, i.e., the PCL produces a .dll file that I'll add to my MainApplication as a reference. The problem here is that the WinRT does not produce a .dll, but a .winmd file instead. The thing here is that I don't know how to add that file to my PCL as a reference.
To sum it all up, how can I add, as reference, the result of a WinRT project build? Is it the .winmd file or some other?
I managed to solve my problem and it was all a question of figuring out which files from the WinRT I should add. So when you're creating a .nuget package and you want to add a WinRT project as if it were a .dll, you need the WindowsRuntimeProject.pri
file and the WindowsRuntimeProject.winmd
file. When you install the package on your project the WinRT will look like a .dll.
It looks something like this:
More info on how to build that .nuget package can be found here.