From b770669f4c39ad10f69956e562eab029d9622a54 Mon Sep 17 00:00:00 2001 From: Aditya Patwardhan Date: Mon, 9 Mar 2026 14:07:12 -0700 Subject: [PATCH] [release/v7.5] Bring Release Changes from v7.6.0-preview.6 (#26963) --- build.psm1 | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/build.psm1 b/build.psm1 index f51bb6ee75..d87833513b 100644 --- a/build.psm1 +++ b/build.psm1 @@ -2548,19 +2548,21 @@ function Start-PSBootstrap { Write-LogGroupEnd -Title "Install Windows Dependencies" } - if ($Scenario -in 'All', 'Tools') { - Write-LogGroupStart -Title "Install .NET Global Tools" - Write-Log -message "Installing .NET global tools" + # Ensure dotnet is available + Find-Dotnet - # Ensure dotnet is available - Find-Dotnet + if (-not $env:TF_BUILD) { + if ($Scenario -in 'All', 'Tools') { + Write-LogGroupStart -Title "Install .NET Global Tools" + Write-Log -message "Installing .NET global tools" - # Install dotnet-format - Write-Verbose -Verbose "Installing dotnet-format global tool" - Start-NativeExecution { - dotnet tool install --global dotnet-format + # Install dotnet-format + Write-Verbose -Verbose "Installing dotnet-format global tool" + Start-NativeExecution { + dotnet tool install --global dotnet-format + } + Write-LogGroupEnd -Title "Install .NET Global Tools" } - Write-LogGroupEnd -Title "Install .NET Global Tools" } if ($env:TF_BUILD) {