Skip to content

Commit 27c56a6

Browse files
authored
[Windows] _BeforeUnpackLibraryResources - Delete all files in a single run. Fixes #23440 (#23441)
Minor perf improvement by executing delete once with all the files to delete instead of running it for each file. Fixes #23440 --------- Co-authored-by: Emanuel Fernandez Dell'Oca <[email protected]>
1 parent 252e0f8 commit 27c56a6

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

msbuild/Xamarin.Shared/Xamarin.Shared.targets

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2118,10 +2118,15 @@ Copyright (C) 2018 Microsoft. All rights reserved.
21182118
>
21192119

21202120
<!-- If any assemblies is newer than the stamp file, we delete the stamp file and items so that _UnpackLibraryResources runs again -->
2121+
<ItemGroup>
2122+
<_UnpackLibraryResourceToDelete Include="@(_UnpackLibraryResourceItems->'%(StampFile)')" />
2123+
<_UnpackLibraryResourceToDelete Include="@(_UnpackLibraryResourceItems->'%(ItemsFile)')" />
2124+
</ItemGroup>
2125+
21212126
<Delete
21222127
Condition="'$(IsMacEnabled)' == 'true' Or '$(IsHotRestartBuild)' == 'true'"
21232128
SessionId="$(BuildSessionId)"
2124-
Files="%(_UnpackLibraryResourceItems.StampFile);%(_UnpackLibraryResourceItems.ItemsFile)"
2129+
Files="@(_UnpackLibraryResourceToDelete)"
21252130
/>
21262131
</Target>
21272132

0 commit comments

Comments
 (0)