openvinotoolkit / openvinotoolkit/model_server

Windows build fails on Visual Studio 2026 / newer MSVC toolsets (hardcoded VS2022 + toolset)

Open
#4,333 0 comments 0 reactions 0 assignees View on GitHub

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, and windows_test.bat hardcode C:\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_signed is forbidden") on TensorFlow/XLA's quantized-type specializations (xla/tsl/framework/type_traits.h). XLA builds with /WX, so it escalates to a fatal C2220 and 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 openvino dependency link uses mklink /d (symbolic link), which requires SeCreateSymbolicLinkPrivilege (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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.