Skip to content

Move OneBranch pipelines to Windows Server 2025 / VSE 2026 image#41053

Draft
benhillis wants to merge 5 commits into
microsoft:masterfrom
benhillis:benhillis/onebranch-vse2026
Draft

Move OneBranch pipelines to Windows Server 2025 / VSE 2026 image#41053
benhillis wants to merge 5 commits into
microsoft:masterfrom
benhillis:benhillis/onebranch-vse2026

Conversation

@benhillis

@benhillis benhillis commented Jul 10, 2026

Copy link
Copy Markdown
Member

Summary

Moves the OneBranch pipelines (PR, nightly, release) from the Windows Server 2022 / VS 2022 image to the Windows Server 2025 / VS 2026 image (onebranch.azurecr.io/windows/ltsc2025/vse2026:latest), and makes the repo require Visual Studio 2026 for local builds.

Motivation: the VS 2026 image ships LLVM/Clang 20.1.x (vs 19.1.x on VS 2022). An upcoming Linux SDK with a libc++ that needs Clang 20 requires this toolchain; VS 2022 only provides Clang 19. The WSL Linux components compile with the VS-bundled Clang, so the whole toolchain has to move to VS 2026.

Changes

Pipelines (all three *-onebranch.yml)

  • WindowsContainerImage -> onebranch.azurecr.io/windows/ltsc2025/vse2026:latest
  • featureFlags.WindowsHostVersion -> structured Version: 2025 (documented way to select the Server 2025 host per OneBranch "2025 Infra Support"; a ltsc2025 container requires a Server 2025 host)
  • Removed the top-level WindowsHostVersion pipeline variable, which was never referenced
  • build-job.yml: NuGet restore now passes -SolutionDirectory .. The VS 2026 CMake generator emits wsl.slnx (the new XML solution format) instead of wsl.sln, and the vendored NuGet 5.10 can't auto-detect .slnx, so restore needs an explicit solution directory to locate ./packages.

Require VS 2026 for build setup

  • CMakeLists.txt: find_vs_install_dir now targets VS 2026 only ([18.0,19.0)) and hard-fails if it is not present. Dropped the VS 2022 fallback.
  • .config/*.winget, .vsconfig, tools/setup-dev-env.ps1, docs: install/require VS 2026 (package id Microsoft.VisualStudio.<Edition>, channel VisualStudio.18.Release, toolset v145) and add the Clang toolset component.

Clang-format baseline bump (19.1.5 -> 20.1.8)

  • Prefer VS 2026's clang-format so local FormatSource.ps1 output matches the pipeline check.
  • Reformatted the affected source files under clang-format 20.1.8 (no functional changes).

Misc

  • Replaced a Credential-Scanner-flagged sample password in the WSLc C# API docs with a <password> placeholder.

Validation

Nightly pipeline wsl-github-nightly build 20260710.5 is green end to end on this branch: SDL (Credential Scanner), build_x64, build_arm64, package, nuget, and all wsl1 / wsl2 / wslc test phases (fe / ni / rs / vb) succeeded.

@benhillis benhillis requested a review from a team as a code owner July 10, 2026 18:16
Copilot AI review requested due to automatic review settings July 10, 2026 18:16
Switch the OneBranch container image from the Server 2022 / VS 2022
image to the Server 2025 / VS Enterprise 2026 image. This brings the
LLVM/Clang toolset from 19.1.x up to 20.1.8.

Per the OneBranch "2025 Infra Support" guidance, the Server 2025 host
is selected via the structured featureFlags.WindowsHostVersion Version
field rather than a host-name string. The top-level WindowsHostVersion
pipeline variable was unreferenced and is removed.

Co-authored-by: Copilot <[email protected]>
Copilot-Session: c700591a-bd3e-4ae9-996e-61b14b693852
@benhillis benhillis force-pushed the benhillis/onebranch-vse2026 branch from 30bc2d7 to c3cd27a Compare July 10, 2026 18:20

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

incorrect summary

Comment thread .pipelines/wsl-build-pr-onebranch.yml
Copilot AI review requested due to automatic review settings July 10, 2026 18:23

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

@benhillis

Copy link
Copy Markdown
Member Author

We also need to update our pool for the OSS pipelines, so this is not mergeable yet.

…mage

The OneBranch pipelines now run on the VSE2026 image, which ships
clang-format 20.1.8 instead of VS2022's 19.1.5. Reformat the 52 files that
20.1.8 formats differently, and flip CMakeLists to prefer VS2026 (falling
back to VS2022) so local formatting matches the pipeline again. This
resolves the TODO to require VS2026 once CI supports it.

Also replace the credential-looking example password in the WSLc C# API
docs with a placeholder to clear a Credential Scanner (CSCAN-MSFT0090) hit.

Co-authored-by: Copilot <[email protected]>
Copilot-Session: d3de59ec-7508-440a-b7e5-1345aad2096a
Copilot AI review requested due to automatic review settings July 10, 2026 20:14

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 57 out of 57 changed files in this pull request and generated 1 comment.

Comment thread CMakeLists.txt Outdated
The VS2026 CMake generator emits wsl.slnx instead of wsl.sln. The vendored NuGet 5.10 cannot auto-detect a .slnx solution, so 'nuget restore -NonInteractive' failed with 'Cannot determine the packages folder'. Pass -SolutionDirectory . so restore locates ./packages independent of solution format.

Co-authored-by: Copilot <[email protected]>

Copilot-Session: d3de59ec-7508-440a-b7e5-1345aad2096a
Copilot AI review requested due to automatic review settings July 10, 2026 20:30

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 58 out of 58 changed files in this pull request and generated 1 comment.

Comment thread CMakeLists.txt
Co-authored-by: Copilot <[email protected]>

Copilot-Session: 742a559b-56fb-4dcc-b795-f03e6a94a37b
Copilot AI review requested due to automatic review settings July 10, 2026 22:09

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 69 out of 69 changed files in this pull request and generated 2 comments.

Comment thread src/linux/init/GnsEngine.cpp Outdated
Comment thread src/linux/init/GnsEngine.cpp
@benhillis benhillis marked this pull request as draft July 11, 2026 17:03
The break statements following unconditional throw in two default switch
cases are dead code (flagged in PR microsoft#41053 review). Remove them.

Co-authored-by: Copilot <[email protected]>
Copilot-Session: d3de59ec-7508-440a-b7e5-1345aad2096a
Copilot AI review requested due to automatic review settings July 11, 2026 17:13

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 69 out of 69 changed files in this pull request and generated no new comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants