@@ -80,30 +80,18 @@ steps:
8080 # Special handling for ARM64.
8181 - ${{ else }} :
8282
83- # The runtimes array must be formatted as a comma-separated string with each
84- # runtime enclosed in single-quotes. This prevents PowerShell from
85- # interpreting each runtime as a decimal number and removing trailing '.0'.
86- - pwsh : |
87- $runtimes = `
88- @( ${{ join(parameters.runtimes, ', ') }} ) | `
89- ForEach-Object { "'$_'" } | `
90- Join-String -Separator ","
91-
92- Write-Host "install-dotnet Runtimes: $runtimes"
93-
94- Write-Host "##vso[task.setvariable variable=installDotnetRuntimesArg]$runtimes"
95- displayName: Format runtimes for PowerShell parameter
96-
9783 # Use the install script for ARM64.
9884 - task : PowerShell@2
9985 displayName : Install .NET SDK and Runtimes for ARM64
10086 pwsh : true
10187 filePath : install-dotnet-arm64.ps1
88+ # Each runtime must be quoted to avoid PowerShell interpreting them as
89+ # decimal numbers and truncating the fractional part.
10290 arguments : >
10391 -Debug:${{ parameters.debug }}
10492 -GlobalJson "$(Build.SourcesDirectory)/global.json"
10593 -InstallDir "${{ parameters.installDir }}"
106- -Runtimes $(installDotnetRuntimesArg)
94+ -Runtimes "${{ join(parameters.runtimes, '", "') }}"
10795
10896 # Report what was installed.
10997 - pwsh : dotnet --info
0 commit comments