Skip to content

[release/v7.5] Bring Release Changes from v7.6.0-preview.6#26963

Merged
adityapatwardhan merged 1 commit intoPowerShell:release/v7.5from
adityapatwardhan:backport/release/v7.5/26627-9ef5ec473
Mar 9, 2026
Merged

[release/v7.5] Bring Release Changes from v7.6.0-preview.6#26963
adityapatwardhan merged 1 commit intoPowerShell:release/v7.5from
adityapatwardhan:backport/release/v7.5/26627-9ef5ec473

Conversation

@adityapatwardhan
Copy link
Member

Backport of #26627 to release/v7.5

Triggered by @adityapatwardhan on behalf of @jshigetomi

Original CL Label: CL-BuildPackaging

/cc @PowerShell/powershell-maintainers

Impact

REQUIRED: Choose either Tooling Impact or Customer Impact (or both). At least one checkbox must be selected.

Tooling Impact

  • Required tooling change
  • Optional tooling change (include reasoning)

Modifies Start-PSBootstrap in build.psm1 to skip installing dotnet-format global tool in CI (TF_BUILD) environments and moves Find-Dotnet call outside the conditional block.

Customer Impact

  • Customer reported
  • Found internally

Regression

REQUIRED: Check exactly one box.

  • Yes
  • No

This is not a regression.

Testing

N/A - Build infrastructure change. Can only be verified interactively or during CI runs. Original PR was tested in CI.

Risk

REQUIRED: Check exactly one box.

  • High
  • Medium
  • Low

Only changes dotnet tool installation logic in build.psm1 to skip installing dotnet-format in CI environments. No runtime or product code changes.

Merge Conflicts

Conflict in .pipelines/templates/release-MSIX-Publish.yml resolved by keeping the existing release/v7.5 version. The YAML condition syntax fix (from '$(VAR)' to variables['VAR']) was already present in release/v7.5. Only the build.psm1 changes apply.

…Shell#26627)

1. Fix the conditions used in `release-MSIX-Publish.yml`
2. Update `build.psm1` to not install dotnet format tool for ADO build.
@adityapatwardhan adityapatwardhan requested a review from a team as a code owner March 9, 2026 20:40
Copilot AI review requested due to automatic review settings March 9, 2026 20:40
@adityapatwardhan adityapatwardhan added the CL-BuildPackaging Indicates that a PR should be marked as a build or packaging change in the Change Log label Mar 9, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Backports build infrastructure changes to release/v7.5 to adjust bootstrap behavior in CI, specifically around locating dotnet and installing developer-only .NET global tools.

Changes:

  • Ensures Find-Dotnet is invoked prior to later bootstrap steps that may call dotnet.
  • Skips installing the dotnet-format global tool when running under Azure Pipelines ($env:TF_BUILD).

Comment on lines +2551 to +2552
# Ensure dotnet is available
Find-Dotnet
Copy link

Copilot AI Mar 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Find-Dotnet is now invoked unconditionally, which changes Start-PSBootstrap -Scenario Package behavior (it may emit warnings and potentially adjust PATH even though dotnet isn’t needed). Consider gating this call to scenarios that actually require dotnet (e.g., All/Both/DotNet/Tools) or moving it into the Tools and TF_BUILD blocks where dotnet is used.

Suggested change
# Ensure dotnet is available
Find-Dotnet
# Ensure dotnet is available only for scenarios that use it or in TF_BUILD
if ($Scenario -in 'All', 'Both', 'DotNet', 'Tools' -or $env:TF_BUILD) {
Find-Dotnet
}

Copilot uses AI. Check for mistakes.
Comment on lines +2556 to +2564
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"
Copy link

Copilot AI Mar 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The "Install .NET Global Tools" log group isn’t protected with a try/finally. If dotnet tool install fails (and Start-NativeExecution throws), the group won’t be closed, which can break log grouping in CI. Wrap the body in try { ... } finally { Write-LogGroupEnd ... }.

Copilot uses AI. Check for mistakes.
@adityapatwardhan adityapatwardhan enabled auto-merge (squash) March 9, 2026 20:52
@adityapatwardhan adityapatwardhan merged commit b770669 into PowerShell:release/v7.5 Mar 9, 2026
43 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CL-BuildPackaging Indicates that a PR should be marked as a build or packaging change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants