diff --git a/eng/common/scripts/Package-Properties.ps1 b/eng/common/scripts/Package-Properties.ps1 index 999d818b4b03..1784521252df 100644 --- a/eng/common/scripts/Package-Properties.ps1 +++ b/eng/common/scripts/Package-Properties.ps1 @@ -187,12 +187,17 @@ function Get-PrPkgProperties([string]$InputDiffJson) { } } + $existingPackageNames = @($packagesWithChanges | ForEach-Object { $_.Name }) foreach ($addition in $additionalValidationPackages) { $key = $addition.Replace($RepoRoot, "").TrimStart('\/') if ($lookup[$key]) { - $lookup[$key].IncludedForValidation = $true - $packagesWithChanges += $lookup[$key] + $pkg = $lookup[$key] + + if ($pkg.Name -notin $existingPackageNames) { + $pkg.IncludedForValidation = $true + $packagesWithChanges += $pkg + } } }