Skip to content

Add Visual Studio 2026 CMake generator support#26802

Merged
fs-eire merged 2 commits intomainfrom
copilot/add-support-for-visual-studio-2026
Dec 23, 2025
Merged

Add Visual Studio 2026 CMake generator support#26802
fs-eire merged 2 commits intomainfrom
copilot/add-support-for-visual-studio-2026

Conversation

Copy link
Contributor

Copilot AI commented Dec 15, 2025

Description

Add "Visual Studio 18 2026" to the list of supported CMake generators in the build script, matching the CMake 3.32+ release that added VS 2026 support.

Changes:

  • Added "Visual Studio 18 2026" to --cmake_generator choices in build_args.py
  • Updated fuzz testing generator validation to accept both VS 2022 and VS 2026

Usage:

./build.py --cmake_generator "Visual Studio 18 2026" --build_dir build

Motivation and Context

CMake 3.32+ includes Visual Studio 18 2026 generator support. ONNX Runtime's build script only supported up to Visual Studio 17 2022, blocking users with VS 2026 installations.

Original prompt

Recently, Visual Studio 2026 is released and CMake has the support for it: https://cmake.org/cmake/help/latest/generator/Visual%20Studio%2018%202026.html

However, ONNX Runtime's build script (build.py) does not have the support for it. currently supported cmake generators are:

build.py --help

...
--cmake_generator {MinGW Makefiles,Ninja,NMake Makefiles,NMake Makefiles JOM,Unix Makefiles,Visual Studio 17 2022,Xcode}
...

Please make a PR to add support for the latest visual studio.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: fs-eire <7679871+fs-eire@users.noreply.github.com>
Copilot AI changed the title [WIP] Add support for Visual Studio 2026 in build script Add Visual Studio 2026 CMake generator support Dec 15, 2025
Copilot AI requested a review from fs-eire December 15, 2025 22:00
@fs-eire fs-eire marked this pull request as ready for review December 15, 2025 22:30
@fs-eire
Copy link
Contributor

fs-eire commented Dec 15, 2025

/azp run Linux QNN CI Pipeline, Win_TRT_Minimal_CUDA_Test_CI, Windows ARM64 QNN CI Pipeline, Windows GPU Doc Gen CI Pipeline

@fs-eire fs-eire enabled auto-merge (squash) December 15, 2025 22:35
@azure-pipelines
Copy link

Azure Pipelines successfully started running 4 pipeline(s).

@fs-eire fs-eire merged commit ed89ce7 into main Dec 23, 2025
89 checks passed
@fs-eire fs-eire deleted the copilot/add-support-for-visual-studio-2026 branch December 23, 2025 08:14
alex-spacemit pushed a commit to spacemit-com/onnxruntime that referenced this pull request Jan 20, 2026
### Description

Add "Visual Studio 18 2026" to the list of supported CMake generators in
the build script, matching the CMake 3.32+ release that added VS 2026
support.

**Changes:**
- Added `"Visual Studio 18 2026"` to `--cmake_generator` choices in
`build_args.py`
- Updated fuzz testing generator validation to accept both VS 2022 and
VS 2026

**Usage:**
```bash
./build.py --cmake_generator "Visual Studio 18 2026" --build_dir build
```

### Motivation and Context

CMake 3.32+ includes Visual Studio 18 2026 generator support. ONNX
Runtime's build script only supported up to Visual Studio 17 2022,
blocking users with VS 2026 installations.

<!-- START COPILOT CODING AGENT SUFFIX -->



<!-- START COPILOT ORIGINAL PROMPT -->



<details>

<summary>Original prompt</summary>

> Recently, Visual Studio 2026 is released and CMake has the support for
it:
https://cmake.org/cmake/help/latest/generator/Visual%20Studio%2018%202026.html
> 
> However, ONNX Runtime's build script (build.py) does not have the
support for it. currently supported cmake generators are:
> 
> ```
> build.py --help
> 
> ...
> --cmake_generator {MinGW Makefiles,Ninja,NMake Makefiles,NMake
Makefiles JOM,Unix Makefiles,Visual Studio 17 2022,Xcode}
> ...
> ```
> 
> Please make a PR to add support for the latest visual studio.


</details>



<!-- START COPILOT CODING AGENT TIPS -->
---

💬 We'd love your input! Share your thoughts on Copilot coding agent in
our [2 minute survey](https://gh.io/copilot-coding-agent-survey).

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: fs-eire <7679871+fs-eire@users.noreply.github.com>
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.

3 participants