Skip to content

Commit

Permalink
Remove references to stale winmd files to fix incremental builds (#1404)
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
Scottj1s committed Apr 5, 2024
1 parent e03bdc4 commit d2a6677
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion nuget/Microsoft.Windows.CppWinRT.targets
Original file line number Diff line number Diff line change
Expand Up @@ -861,7 +861,9 @@ $(XamlMetaDataProviderPch)
Condition="'@(Page)@(ApplicationDefinition)' != '' and '$(XamlLanguage)' == 'CppWinRT'"
DependsOnTargets="$(CppWinRTAddXamlReferencesDependsOn);CppWinRTGetResolvedWinMD;GetCppWinRTProjectWinMDReferences">
<ItemGroup>
<XamlReferencesToCompile Include="@(WinMDFullPath);@(CppWinRTDynamicProjectWinMDReferences)" />
<XamlReferencesToCompile Include="$(OutDir)*.winmd" />
<!--Remove references to stale artifacts that will be copied later-->
<XamlReferencesToCompile Remove="@(ReferenceCopyLocalPaths)" MatchOnMetadata="FileName;Extension"/>
</ItemGroup>
</Target>

Expand Down

0 comments on commit d2a6677

Please sign in to comment.