Skip to content

Conversation

@jlaanstra
Copy link
Contributor

In #404, we added a property to enable Windows Metadata. We calculate a default is one is not specified, but there are a few cases where we know we should disable it without the need to calculate anything.

If the project specifically set a property to indicate it's a CX project, we will never generate a WinMD and we can therefore set CppWinRTGenerateWindowsMetadata to false.

@jlaanstra jlaanstra requested a review from Scottj1s October 29, 2019 23:02
<!-- For CX projects, CppWinRT will never output a winmd-->
<!-- NOTE: We don't set a default here as the default requires evaluation of project references
and this is done by the ComputeCppWinRTResolvedWinMD target. -->
<CppWinRTGenerateWindowsMetadata Condition="'$(CppWinRTGenerateWindowsMetadata)' == '' AND '$(CppWinRTProjectLanguage)' == 'C++/CX' ">false</CppWinRTGenerateWindowsMetadata>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this line is redundant, same with the pair of checks below (line 33) - checking XamlLanguage == 'C++' should suffice

@Scottj1s Scottj1s merged commit 609ad4b into microsoft:master Nov 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants