From d770e6dbb5d39a1ac711728f790831fbc8c81089 Mon Sep 17 00:00:00 2001 From: Hongtao Zhang Date: Sun, 16 Mar 2025 17:08:55 -0500 Subject: [PATCH] try delete only the first level dll --- Scripts/post_build.ps1 | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Scripts/post_build.ps1 b/Scripts/post_build.ps1 index 40f102ab4..a10441026 100644 --- a/Scripts/post_build.ps1 +++ b/Scripts/post_build.ps1 @@ -46,9 +46,11 @@ function Delete-Unused ($path, $config) { # ignore some specific dll that seems to make issue continue } - $deleteList = Get-ChildItem $target\Plugins -Filter $i.Name -Recurse | Where { $_.VersionInfo.FileVersion -eq $i.VersionInfo.FileVersion -And $_.Name -eq $i.Name } - $deleteList | ForEach-Object{ Write-Host Deleting duplicated $_.Name with version $_.VersionInfo.FileVersion at location $_.Directory.FullName } - $deleteList | Remove-Item + foreach ($plugin in Get-ChildItem $target\Plugins){ + $deleteList = Get-ChildItem $target\Plugins -Filter $i.Name | Where { $_.VersionInfo.FileVersion -eq $i.VersionInfo.FileVersion -And $_.Name -eq $i.Name } + $deleteList | ForEach-Object{ Write-Host Deleting duplicated $_.Name with version $_.VersionInfo.FileVersion at location $_.Directory.FullName } + $deleteList | Remove-Item + } } Remove-Item -Path $target -Include "*.xml" -Recurse }