openvinotoolkit / openvinotoolkit/model_server
Windows build fails on Visual Studio 2026 / newer MSVC toolsets (hardcoded VS2022 + toolset)
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 931
- Forks
- 277
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 68
Description
Describe the bug
The Windows build scripts hardcode Visual Studio 2022 Build Tools and a specific MSVC toolset version, so a machine with only Visual Studio 2026 (v18 / MSVC 14.51) installed cannot build OVMS.
Specifically:
windows_install_build_dependencies.bat,windows_build.bat,windows_setupvars.bat, andwindows_test.bathardcodeC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools, the CMake generator string"Visual Studio 17 2022", and a pinned MSVC toolset version (14.44.35207).- MSVC 14.51 (VS 2026) raises C5285 ("specializing
std::is_signedis forbidden") on TensorFlow/XLA's quantized-type specializations (xla/tsl/framework/type_traits.h). XLA builds with/WX, so it escalates to a fatalC2220and the build aborts. - The OpenCV dependency build hardcodes
-T v142(VS 2019 toolset, absent on a VS 2026 box), and newer CMake (4.x) errors out in OpenCV's python auto-detection (find_package called with invalid argument "OFF"). - The
openvinodependency link usesmklink /d(symbolic link), which requiresSeCreateSymbolicLinkPrivilege(admin / Developer Mode).
Expected behavior
The Windows build should auto-detect the installed Visual Studio edition and MSVC toolset (via vswhere) and build successfully on supported newer toolchains (VS 2022 through VS 2026), without requiring an elevated shell.
Environment
- OS: Windows 11
- Toolchain: Visual Studio 2026 (18.7), MSVC 14.51
- OVMS: 2026.3.0 (built from source)
Fix
Resolved by PR #4328 (vswhere auto-detection of VS edition/generator/toolset, /wd5285 for XLA, OpenCV toolset/python fixes, and mklink /j junction for non-elevated installs).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with windows_install_build_dependencies.bat, windows_build.bat, windows_setupvars.bat, and windows_test.bat, then review PR #4328 for the completed work. Verify the Windows build and dependency setup across Visual Studio 2022–2026 without an elevated shell; the issue is already described as resolved by that pull request.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake, cpp, opencv, tensorflow
- Domain
- build-system, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 25/100