Skip to content

Commit d2a6677

Browse files
authored
Remove references to stale winmd files to fix incremental builds (#1404)
The original attempt at a fix for this was too aggressive: https://github.com/microsoft/cppwinrt/pull/1381/files This fix is targeted specifically at removing references to stale winmd files that have yet to be copied from referenced projects (e.g., from a runtime component to an app).
1 parent e03bdc4 commit d2a6677

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

nuget/Microsoft.Windows.CppWinRT.targets

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -861,7 +861,9 @@ $(XamlMetaDataProviderPch)
861861
Condition="'@(Page)@(ApplicationDefinition)' != '' and '$(XamlLanguage)' == 'CppWinRT'"
862862
DependsOnTargets="$(CppWinRTAddXamlReferencesDependsOn);CppWinRTGetResolvedWinMD;GetCppWinRTProjectWinMDReferences">
863863
<ItemGroup>
864-
<XamlReferencesToCompile Include="@(WinMDFullPath);@(CppWinRTDynamicProjectWinMDReferences)" />
864+
<XamlReferencesToCompile Include="$(OutDir)*.winmd" />
865+
<!--Remove references to stale artifacts that will be copied later-->
866+
<XamlReferencesToCompile Remove="@(ReferenceCopyLocalPaths)" MatchOnMetadata="FileName;Extension"/>
865867
</ItemGroup>
866868
</Target>
867869

0 commit comments

Comments
 (0)