diff --git a/NuGet/Get-BcNuGetPackageId.ps1 b/NuGet/Get-BcNuGetPackageId.ps1 index 2b4cb4211..fb66ecb86 100644 --- a/NuGet/Get-BcNuGetPackageId.ps1 +++ b/NuGet/Get-BcNuGetPackageId.ps1 @@ -49,8 +49,8 @@ function Get-BcNuGetPackageId { # Max. Length of NuGet Package Id is 100 - we shorten the name part of the id if it is too long $packageId = $packageIdTemplate.replace('{name}',$nname) if ($packageId.Length -gt 100) { - if ($nname.Length -gt ($packageId.Length - 99)) { - $nname = $nname.Substring(0, $nname.Length - ($packageId.Length - 99)) + if ($nname.Length -gt ($packageId.Length - 100)) { + $nname = $nname.Substring(0, $nname.Length - ($packageId.Length - 100)) } else { throw "Package id is too long: $packageId, unable to shorten it" diff --git a/ReleaseNotes.txt b/ReleaseNotes.txt index 57847b183..c3bdc9b25 100644 --- a/ReleaseNotes.txt +++ b/ReleaseNotes.txt @@ -6,6 +6,7 @@ Issue 3952 Get-AlLanguageExtensionFromArtifacts fails on new BC artifacts Add support for TestType field when running tests Issue 3943 Error downloading symbols for Microsoft_System Add support for RequiredTestIsolation field when running tests +Fix package ID length adjustment logic in Get-BcNuGetPackageId function Catch errors when page scripting tests are failing 6.1.6