From 4391213ac17efab6c78c6477f7a2394bb04d6a8c Mon Sep 17 00:00:00 2001 From: Sven Boemer Date: Mon, 28 Aug 2023 12:53:30 -0700 Subject: [PATCH] Prevent restore from deleting mibc cache file (#91220) Restore should not remove the mibc cache file that is used to enable incrementalism when merging mibc files. This fixes an issue with the logic introduced in 454057de49d9e2ab337f808e1f65d1dda8dbe71a, which was tested on incremental builds without restore. --- eng/restore/optimizationData.targets | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/eng/restore/optimizationData.targets b/eng/restore/optimizationData.targets index 4d6b773bf201..009d6c8bca1e 100644 --- a/eng/restore/optimizationData.targets +++ b/eng/restore/optimizationData.targets @@ -1,4 +1,4 @@ - + @@ -25,6 +25,9 @@ + + <_MergeMibcFilesCacheFile>$(MibcOptimizationDataDir)/$(TargetOS)/$(TargetArchitecture)/merge_mibc_files.cache + $(NuGetPackageRoot)%(MIBCPackage.Identity)/%(MIBCPackage.Version) @@ -32,7 +35,7 @@ <_optimizationMibcFile Include="%(MIBCPackage.PackagePath)/**/*.mibc" SubdirectoryName="$(TargetOS)/$(TargetArchitecture)" /> <_optimizationMibcDestinationFile Include="@(_optimizationMibcFile->'$(MibcOptimizationDataDir)%(SubdirectoryName)/%(RecursiveDir)%(Filename)%(Extension)')" /> + Exclude="@(_optimizationMibcDestinationFile);$(_MergeMibcFilesCacheFile)"/>