Skip to content

Commit c8d27c1

Browse files
authored
Only build the reference projection when there are references.
Only build the reference projection when there are references.
1 parent e4830e1 commit c8d27c1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

nuget/Microsoft.Windows.CppWinRT.targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ $(XamlMetaDataProviderPch)
443443

444444
<!--Build reference projection from WinMD project references and dynamic library project references-->
445445
<Target Name="CppWinRTMakeReferenceProjection"
446-
Condition="'$(CppWinRTEnableReferenceProjection)' == 'true'"
446+
Condition="'@(CppWinRTDirectWinMDReferences)@(CppWinRTDynamicProjectWinMDReferences)' != '' AND '$(CppWinRTEnableReferenceProjection)' == 'true'"
447447
DependsOnTargets="GetCppWinRTProjectWinMDReferences;GetCppWinRTPlatformWinMDReferences;GetCppWinRTDirectWinMDReferences;$(CppWinRTMakeReferenceProjectionDependsOn)"
448448
Inputs="@(CppWinRTDirectWinMDReferences);@(CppWinRTDynamicProjectWinMDReferences);@(CppWinRTPlatformWinMDReferences)"
449449
Outputs="@(CppWinRTDirectWinMDReferences->'$(GeneratedFilesDir)winrt\%(Filename).h');@(CppWinRTDynamicProjectWinMDReferences->'$(GeneratedFilesDir)winrt\%(Filename).h')">

0 commit comments

Comments
 (0)