Skip to content

Commit 609ad4b

Browse files
jlaanstraScottj1s
authored andcommitted
Add a better default for CppWinRTGenerateWindowsMetadata for CX projects. (#405)
* Add a better default for CX projects. * Add warning. * Update Microsoft.Windows.CppWinRT.targets
1 parent 586a10f commit 609ad4b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

nuget/Microsoft.Windows.CppWinRT.targets

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,12 @@ Copyright (C) Microsoft Corporation. All rights reserved.
2323
<XamlNamespace Condition="'$(XamlNamespace)' == ''">Windows.UI.Xaml</XamlNamespace>
2424
<XamlMetaDataProviderIdl Condition="'$(XamlMetaDataProviderIdl)'== ''">$(GeneratedFilesDir)XamlMetaDataProvider.idl</XamlMetaDataProviderIdl>
2525
<XamlMetaDataProviderCpp Condition="'$(XamlMetaDataProviderCpp)'== ''">$(GeneratedFilesDir)XamlMetaDataProvider.cpp</XamlMetaDataProviderCpp>
26+
27+
<!-- For CX projects, CppWinRT will never output a winmd-->
28+
<!-- NOTE: We don't set a default here as the default requires evaluation of project references
29+
and this is done by the ComputeCppWinRTResolvedWinMD target. -->
30+
<CppWinRTGenerateWindowsMetadata Condition="'$(CppWinRTGenerateWindowsMetadata)' == '' AND '$(XamlLanguage)' == 'C++' ">false</CppWinRTGenerateWindowsMetadata>
2631
<!-- For CX projects, turn off the component projection generation-->
27-
<CppWinRTEnableComponentProjection Condition="'$(CppWinRTEnableComponentProjection)' == '' AND '$(CppWinRTProjectLanguage)' == 'C++/CX' ">false</CppWinRTEnableComponentProjection>
2832
<CppWinRTEnableComponentProjection Condition="'$(CppWinRTEnableComponentProjection)' == '' AND '$(XamlLanguage)' == 'C++' ">false</CppWinRTEnableComponentProjection>
2933
<CppWinRTEnableComponentProjection Condition="'$(CppWinRTEnableComponentProjection)' == ''">true</CppWinRTEnableComponentProjection>
3034
<CppWinRTEnablePlatformProjection Condition="'$(CppWinRTEnablePlatformProjection)' == ''">true</CppWinRTEnablePlatformProjection>

0 commit comments

Comments
 (0)