Modules/businessdev.ALbuild.RuntimePackages/Private/Get-BcRuntimeNuGetRange.ps1

function Get-BcRuntimeNuGetRange {
    <#
    .SYNOPSIS
        Computes the NuGet application/platform version ranges for a runtime package.
    .DESCRIPTION
        Internal, pure helper. A runtime package is bound to a single platform version, so its
        Microsoft application and platform dependency ranges are pinned to that build's minor:
          application range : [<platformVersion>, <major>.<minor+1>)
          platform range : [<major>.0, <major>.<minor+1>)
    #>

    [CmdletBinding()]
    [OutputType([PSCustomObject])]
    param(
        [Parameter(Mandatory)] [string] $PlatformVersion
    )

    $version = [version](ConvertTo-BcVersion $PlatformVersion)
    $nextMinor = "$($version.Major).$($version.Minor + 1)"

    return [PSCustomObject]@{
        ApplicationRange = "[$PlatformVersion,$nextMinor)"
        PlatformRange    = "[$($version.Major).0,$nextMinor)"
    }
}