From dc77c4d9136213e1e562546eb7a0a46dabc5d33e Mon Sep 17 00:00:00 2001 From: shimat Date: Thu, 18 Jun 2026 18:45:40 +0900 Subject: [PATCH 1/3] 2026 --- .github/workflows/windows.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 847dcbe041..68677dc0ea 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -75,7 +75,7 @@ jobs: -C cmake/opencv_build_options.cmake ` -S opencv ` -B opencv/build ` - -G "Visual Studio 17 2022" -A x64 ` + -G "Visual Studio 18 2026" -A x64 ` -D CMAKE_TOOLCHAIN_FILE="$env:VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake" ` -D VCPKG_TARGET_TRIPLET=x64-windows-static ` -D VCPKG_MANIFEST_INSTALL=OFF ` @@ -133,7 +133,7 @@ jobs: cmake ` -S src ` -B src/build ` - -G "Visual Studio 17 2022" -A x64 ` + -G "Visual Studio 18 2026" -A x64 ` -D CMAKE_PREFIX_PATH="$env:GITHUB_WORKSPACE/opencv_artifacts" ` -D CMAKE_TOOLCHAIN_FILE="$env:VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake" ` -D VCPKG_TARGET_TRIPLET=x64-windows-static ` @@ -149,7 +149,7 @@ jobs: cmake ` -S src ` -B src/build_slim ` - -G "Visual Studio 17 2022" -A x64 ` + -G "Visual Studio 18 2026" -A x64 ` -D CMAKE_PREFIX_PATH="$env:GITHUB_WORKSPACE/opencv_artifacts" ` -D CMAKE_TOOLCHAIN_FILE="$env:VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake" ` -D VCPKG_TARGET_TRIPLET=x64-windows-static ` @@ -312,7 +312,7 @@ jobs: -C cmake/opencv_build_options.cmake ` -S opencv ` -B opencv/build ` - -G "Visual Studio 17 2022" -A ARM64 ` + -G "Visual Studio 18 2026" -A ARM64 ` -D CMAKE_TOOLCHAIN_FILE="$env:VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake" ` -D VCPKG_TARGET_TRIPLET=arm64-windows-static ` -D VCPKG_MANIFEST_INSTALL=OFF ` @@ -364,7 +364,7 @@ jobs: cmake ` -S src ` -B src/build_arm64 ` - -G "Visual Studio 17 2022" -A ARM64 ` + -G "Visual Studio 18 2026" -A ARM64 ` -D CMAKE_PREFIX_PATH="$env:GITHUB_WORKSPACE/opencv_artifacts" ` -D CMAKE_TOOLCHAIN_FILE="$env:VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake" ` -D VCPKG_TARGET_TRIPLET=arm64-windows-static ` @@ -380,7 +380,7 @@ jobs: cmake ` -S src ` -B src/build_arm64_slim ` - -G "Visual Studio 17 2022" -A ARM64 ` + -G "Visual Studio 18 2026" -A ARM64 ` -D CMAKE_PREFIX_PATH="$env:GITHUB_WORKSPACE/opencv_artifacts" ` -D CMAKE_TOOLCHAIN_FILE="$env:VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake" ` -D VCPKG_TARGET_TRIPLET=arm64-windows-static ` From a3fb3bf74d79e010830b7079fb75c37343f7f829 Mon Sep 17 00:00:00 2001 From: shimat Date: Fri, 19 Jun 2026 09:36:15 +0900 Subject: [PATCH 2/3] Keep VS 2022 generator for ARM64 build 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 --- .github/workflows/windows.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 68677dc0ea..1a8ab8b14c 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -312,7 +312,7 @@ jobs: -C cmake/opencv_build_options.cmake ` -S opencv ` -B opencv/build ` - -G "Visual Studio 18 2026" -A ARM64 ` + -G "Visual Studio 17 2022" -A ARM64 ` -D CMAKE_TOOLCHAIN_FILE="$env:VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake" ` -D VCPKG_TARGET_TRIPLET=arm64-windows-static ` -D VCPKG_MANIFEST_INSTALL=OFF ` @@ -364,7 +364,7 @@ jobs: cmake ` -S src ` -B src/build_arm64 ` - -G "Visual Studio 18 2026" -A ARM64 ` + -G "Visual Studio 17 2022" -A ARM64 ` -D CMAKE_PREFIX_PATH="$env:GITHUB_WORKSPACE/opencv_artifacts" ` -D CMAKE_TOOLCHAIN_FILE="$env:VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake" ` -D VCPKG_TARGET_TRIPLET=arm64-windows-static ` @@ -380,7 +380,7 @@ jobs: cmake ` -S src ` -B src/build_arm64_slim ` - -G "Visual Studio 18 2026" -A ARM64 ` + -G "Visual Studio 17 2022" -A ARM64 ` -D CMAKE_PREFIX_PATH="$env:GITHUB_WORKSPACE/opencv_artifacts" ` -D CMAKE_TOOLCHAIN_FILE="$env:VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake" ` -D VCPKG_TARGET_TRIPLET=arm64-windows-static ` From 2360fc6a4977652535304bc2fe76ff9b24bb9ec4 Mon Sep 17 00:00:00 2001 From: shimat Date: Fri, 19 Jun 2026 09:47:07 +0900 Subject: [PATCH 3/3] Remove VC++ Redistributable from requirements 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 --- README.md | 1 - nuget/README.managed.md | 1 - 2 files changed, 2 deletions(-) diff --git a/README.md b/README.md index a7f466d79a..b6bf60071c 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,6 @@ For more installation options, see the [Installation](#installation) section bel ## Requirements * [.NET 8](https://www.microsoft.com/net/download) or later / .NET Standard 2.0 / .NET Standard 2.1 * .NET Framework 4.6.1 or later is supported via the .NET Standard 2.0 target (WpfExtensions also directly targets .NET Framework 4.8) -* (Windows) [Visual C++ 2022 Redistributable Package](https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads) * (Windows Server) Media Foundation ``` PS1> Install-WindowsFeature Server-Media-Foundation diff --git a/nuget/README.managed.md b/nuget/README.managed.md index 29367287ca..ff678e06bd 100644 --- a/nuget/README.managed.md +++ b/nuget/README.managed.md @@ -34,7 +34,6 @@ For more installation options, see [Installation on GitHub](https://github.com/s ## Requirements ### Windows -- [Visual C++ 2022 Redistributable](https://support.microsoft.com/help/2977003/) - (Windows Server only) Media Foundation: ```powershell Install-WindowsFeature Server-Media-Foundation