diff --git a/NuGet/Get-BcNuGetPackageId.ps1 b/NuGet/Get-BcNuGetPackageId.ps1 index 99fb9aac4..9a70ffb7c 100644 --- a/NuGet/Get-BcNuGetPackageId.ps1 +++ b/NuGet/Get-BcNuGetPackageId.ps1 @@ -45,7 +45,9 @@ function Get-BcNuGetPackageId { if ($nname -eq '') { throw "App name is invalid: '$name'" } if ($npublisher -eq '') { throw "App publisher is invalid: '$publisher'" } - $packageIdTemplate = $packageIdTemplate.replace('{id}',$id).replace('{publisher}',$npublisher).replace('{tag}',$tag).replace('{version}',$version).replace('..','.').TrimEnd('.') + $version = $version.Replace('..', '.').TrimEnd('.').Replace('.', '-'); + + $packageIdTemplate = $packageIdTemplate.replace('{id}',$id).replace('{publisher}',$npublisher).replace('{tag}',$tag).replace('{version}',$version) # 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 -ge 100) {