Skip to content

Commit cb67472

Browse files
authored
CppWinRTAddXamlReferences to not use outputs as inputs (#1381)
Incremental builds fail when a referenced project's winmd has been updated. This is because the CppWinRT reference projection is properly using project's referenced winmds as inputs. But the MarkupCompilePass2 target is using XamlReferencesToCompile, which has been set here to use previously copied output files.
1 parent 5ef408f commit cb67472

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

nuget/Microsoft.Windows.CppWinRT.targets

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -859,9 +859,9 @@ $(XamlMetaDataProviderPch)
859859
<!--Add references to all merged project WinMD files for Xaml Compiler-->
860860
<Target Name="CppWinRTAddXamlReferences"
861861
Condition="'@(Page)@(ApplicationDefinition)' != '' and '$(XamlLanguage)' == 'CppWinRT'"
862-
DependsOnTargets="$(CppWinRTAddXamlReferencesDependsOn)">
862+
DependsOnTargets="$(CppWinRTAddXamlReferencesDependsOn);CppWinRTGetResolvedWinMD;GetCppWinRTProjectWinMDReferences">
863863
<ItemGroup>
864-
<XamlReferencesToCompile Include="$(OutDir)*.winmd" />
864+
<XamlReferencesToCompile Include="@(WinMDFullPath);@(CppWinRTDynamicProjectWinMDReferences)" />
865865
</ItemGroup>
866866
</Target>
867867

0 commit comments

Comments
 (0)