Add default WinMD references to the desktop templates. - #781
Conversation
|
Will this also fix #774 (comment)? cc Dustin L. Howett (@DHowett) |
|
We've been told by the VC project system folks in no uncertain terms that wildcards are explicitly disallowed in vcxprojs (outside of a Target that generates them!) and they'll go out of their way to break them. This solution may conflict with that. |
|
I am personally not a fan of this solution either. Problem is that there is no good way to add them one by one explicitly as the folder location differs per version and the C++ targets don't add any WinMDs for non-UAP projects. If C++/WinRT targets add a set of default WinMDs, they will conflict what the C++ targets add for UAP. |
|
The project system isn't exactly abounding in support for C++ developers. Much of this is making the best of some bad choices. |
|
Let's hold off on merging this for now. I'm gonna add a target that adds the platform winmds and then have desktop templates opt-in. That's probably a better solution. |
I'll try to find a good (or at least much better) choice here. |
Thanks for calling this out Dustin L. Howett (@DHowett) |
|
Updated with a target that mimics what the xaml targets do, including keeping the support for the existing overrides. I don't think we have to document this as we already have CppWinRTOverrideSDKReferences. |
For Universal Windows templates the xaml build targets and C++ build targets add the platform WinMDs to the reference list. However this doesn't happen for desktop templates , because the TargetPlatformIdentifier is not set to UAP.
We have two options:
Since these are desktop templates, option 2 seems preferable.
A possibly even better solution would be the WinRT targets to add the references. However we would have to fight the default C++ build targets to have them stop automatically adding the references and that would be quite a bit of work and possibly break xaml.
Fixes #780