Skip to content

Commit

Permalink
CppWinRTAddXamlReferences to not use outputs as inputs (#1381)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Scottj1s committed Dec 28, 2023
1 parent 5ef408f commit cb67472
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nuget/Microsoft.Windows.CppWinRT.targets
Original file line number Diff line number Diff line change
Expand Up @@ -859,9 +859,9 @@ $(XamlMetaDataProviderPch)
<!--Add references to all merged project WinMD files for Xaml Compiler-->
<Target Name="CppWinRTAddXamlReferences"
Condition="'@(Page)@(ApplicationDefinition)' != '' and '$(XamlLanguage)' == 'CppWinRT'"
DependsOnTargets="$(CppWinRTAddXamlReferencesDependsOn)">
DependsOnTargets="$(CppWinRTAddXamlReferencesDependsOn);CppWinRTGetResolvedWinMD;GetCppWinRTProjectWinMDReferences">
<ItemGroup>
<XamlReferencesToCompile Include="$(OutDir)*.winmd" />
<XamlReferencesToCompile Include="@(WinMDFullPath);@(CppWinRTDynamicProjectWinMDReferences)" />
</ItemGroup>
</Target>

Expand Down

0 comments on commit cb67472

Please sign in to comment.