diff --git a/eng/common/scripts/Helpers/Package-Helpers.ps1 b/eng/common/scripts/Helpers/Package-Helpers.ps1 index 37b4a4bfa..f157d354a 100644 --- a/eng/common/scripts/Helpers/Package-Helpers.ps1 +++ b/eng/common/scripts/Helpers/Package-Helpers.ps1 @@ -281,9 +281,9 @@ function Get-FullPackageName { $groupId = $PackageInfo.Group if ($groupId) { if ($UseColonSeparator) { - return "${groupId}:$($PackageInfo.ArtifactName)" + return "${groupId}:$($PackageInfo.Name)" } - return "${groupId}+$($PackageInfo.ArtifactName)" + return "${groupId}+$($PackageInfo.Name)" } } return $PackageInfo.Name diff --git a/eng/common/scripts/Package-Properties.ps1 b/eng/common/scripts/Package-Properties.ps1 index ea4221fcd..dcab4e721 100644 --- a/eng/common/scripts/Package-Properties.ps1 +++ b/eng/common/scripts/Package-Properties.ps1 @@ -241,6 +241,8 @@ function Get-PkgProperties { [string]$GroupId ) + Write-Host "Get-PkgProperties called with PackageName: [$PackageName], ServiceDirectory: [$ServiceDirectory], GroupId: [$GroupId]" + $allPkgProps = Get-AllPkgProperties -ServiceDirectory $ServiceDirectory if ([string]::IsNullOrEmpty($GroupId)) { @@ -249,8 +251,7 @@ function Get-PkgProperties { else { $pkgProps = $allPkgProps.Where({ ($_.Name -eq $PackageName -or $_.ArtifactName -eq $PackageName) -and - $_.PSObject.Properties.Name -contains "Group" -and - $_.Group -eq $GroupId + ($_.PSObject.Properties.Name -contains "Group" -and $_.Group -eq $GroupId) }); } @@ -261,7 +262,12 @@ function Get-PkgProperties { return $pkgProps[0] } - LogError "Failed to retrieve Properties for [$PackageName]" + if ([string]::IsNullOrEmpty($GroupId)) { + LogError "Failed to retrieve Properties for [$PackageName]" + } + else { + LogError "Failed to retrieve Properties for [$PackageName] with GroupId [$GroupId]. Ensure the package has a Group property matching the specified GroupId." + } return $null }