Skip to content

Migrate Windows CI to Visual Studio 2026 - #1897

Merged
shimat merged 3 commits into
mainfrom
ci/migrate-vs2026
Jun 19, 2026
Merged

shimat merged 3 commits into
mainfrom
ci/migrate-vs2026

Conversation

@shimat

@shimat shimat commented Jun 19, 2026 •

Copy link
Copy Markdown
Owner

The windows-2025 runner image replaced Visual Studio 2022 with Visual Studio 2026, so the hardcoded CMake generator Visual Studio 17 2022 now fails with "could not find any instance of Visual Studio".

https://github.blog/changelog/2026-05-14-github-actions-upcoming-image-migrations/#windows-2025-visual-studio-2026-image-migration

Update the generator to Visual Studio 18 2026 in all 6 cmake invocations in .github/workflows/windows.yml (x64: OpenCV, Extern full, Extern slim; ARM64: the same three).

Summary by CodeRabbit

  • Chores
    • Updated the Windows Server 2025 CI x64 CMake toolchain to use Visual Studio 18 2026 instead of Visual Studio 17 2022.
  • Documentation
    • Removed the Windows requirement for the Visual C++ 2022 Redistributable from the main README.
    • Removed the Visual C++ 2022 Redistributable note from the managed NuGet README’s Windows requirements section.

@shimat shimat self-assigned this Jun 19, 2026
@shimat
shimat marked this pull request as draft June 19, 2026 00:27
@coderabbitai

coderabbitai Bot commented Jun 19, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: a2f026c2-cb20-42c9-ba59-427a25c72a90

📥 Commits

Reviewing files that changed from the base of the PR and between dc77c4d and 2360fc6.

📒 Files selected for processing (3)
  • .github/workflows/windows.yml
  • README.md
  • nuget/README.managed.md
💤 Files with no reviewable changes (2)
  • nuget/README.managed.md
  • README.md

📝 Walkthrough

Walkthrough

The Windows GitHub Actions workflow updates the CMake -G generator argument from Visual Studio 17 2022 to Visual Studio 18 2026 in the x64 build job across three configuration steps (OpenCV, OpenCvSharpExtern full, and OpenCvSharpExtern slim). Corresponding references to the Visual C++ 2022 Redistributable are removed from the main README and NuGet README documentation.

Changes

Visual Studio 2026 Migration

Layer / File(s) Summary
CMake generator update (x64)
.github/workflows/windows.yml
Updates the -G generator to Visual Studio 18 2026 for the OpenCV, OpenCvSharpExtern (full), and OpenCvSharpExtern (slim) configuration steps in the x64 job.
Remove outdated Visual C++ 2022 docs
README.md, nuget/README.managed.md
Removes the Windows requirement entry for the Visual C++ 2022 Redistributable from both documentation files.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: migrating Windows CI to Visual Studio 2026, which directly addresses the core objective of updating the CMake generator in the workflow file.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci/migrate-vs2026

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

shimat and others added 2 commits June 19, 2026 09:36
windows-11-arm still ships Visual Studio 2022, so the
"Visual Studio 18 2026" generator fails with "could not find any
instance of Visual Studio". Only the x64 windows-2025 image has
migrated to VS 2026.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
OpenCvSharpExtern.dll is built with the static CRT (/MT), and the
prebuilt opencv_videoio_ffmpeg DLL depends only on the OS-bundled
msvcrt.dll. Neither links vcruntime140/msvcp140, so the Visual C++
Redistributable is not required. Verified with dumpbin /dependents.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@shimat
shimat marked this pull request as ready for review June 19, 2026 00:47
@shimat
shimat merged commit 2d0e876 into main Jun 19, 2026
11 checks passed
@shimat
shimat deleted the ci/migrate-vs2026 branch June 19, 2026 01:03
@shimat shimat added the enhancement New feature or improvement to OpenCvSharp label Jul 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or improvement to OpenCvSharp

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant