From 75b3fc0c93d9b6237e4918e162b9f2cd5b7c495e Mon Sep 17 00:00:00 2001 From: Xavier Averbouch Date: Wed, 22 Oct 2025 23:27:36 +0200 Subject: [PATCH 1/9] Create CI workflow for building OpenCVSharp windows ARM64 This workflow builds OpenCVSharp for ARM64 on Windows, including setup for dependencies, caching, and artifact uploading. --- .github/workflows/build-win-arm64.yml | 204 ++++++++++++++++++++++++++ 1 file changed, 204 insertions(+) create mode 100644 .github/workflows/build-win-arm64.yml diff --git a/.github/workflows/build-win-arm64.yml b/.github/workflows/build-win-arm64.yml new file mode 100644 index 000000000..f660e23a7 --- /dev/null +++ b/.github/workflows/build-win-arm64.yml @@ -0,0 +1,204 @@ +name: Build OpenCVSharp ARM64 +on: + push: + branches: [ main, master ] + pull_request: + branches: [ main, master ] + workflow_dispatch: +jobs: + build-opencv-arm64: + runs-on: windows-11-arm + steps: + - name: Checkout OpenCVSharp + uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Setup MSBuild + uses: microsoft/setup-msbuild@v2 + + - name: Cache OpenCV + id: cache-opencv + uses: actions/cache@v4 + with: + path: C:\opencv-build + key: opencv-4.11.0-arm64-native-v3-${{ runner.os }} + + - name: Clone OpenCV + if: steps.cache-opencv.outputs.cache-hit != 'true' + shell: powershell + run: | + Set-Location C:\ + git clone --depth 1 --branch 4.11.0 https://github.com/opencv/opencv.git + git clone --depth 1 --branch 4.11.0 https://github.com/opencv/opencv_contrib.git + + - name: Install dependencies via vcpkg + if: steps.cache-opencv.outputs.cache-hit != 'true' + shell: powershell + run: | + & $env:VCPKG_ROOT\vcpkg install libjpeg-turbo:arm64-windows-static + & $env:VCPKG_ROOT\vcpkg integrate install + + - name: Build OpenCV for ARM64 + if: steps.cache-opencv.outputs.cache-hit != 'true' + shell: powershell + run: | + New-Item -ItemType Directory -Force -Path C:\opencv-build | Out-Null + Set-Location C:\opencv-build + + cmake -G "Visual Studio 17 2022" -A ARM64 ` + -D CMAKE_TOOLCHAIN_FILE="$env:VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake" ` + -D VCPKG_TARGET_TRIPLET=arm64-windows-static ` + -D CMAKE_BUILD_TYPE=Release ` + -D CMAKE_INSTALL_PREFIX=install ` + -D OPENCV_EXTRA_MODULES_PATH=C:\opencv_contrib\modules ` + -D BUILD_DOCS=OFF ` + -D BUILD_EXAMPLES=OFF ` + -D BUILD_TESTS=OFF ` + -D BUILD_PERF_TESTS=OFF ` + -D BUILD_JAVA=OFF ` + -D BUILD_opencv_apps=OFF ` + -D BUILD_opencv_datasets=OFF ` + -D BUILD_opencv_gapi=OFF ` + -D BUILD_opencv_dnn=OFF ` + -D WITH_MSMF=ON ` + -D WITH_MSMF_DXVA=ON ` + -D WITH_QT=OFF ` + -D WITH_TESSERACT=OFF ` + -D WITH_CAROTENE=OFF ` + -D WITH_JPEG=ON ` + -D BUILD_JPEG=OFF ` + -D ENABLE_CXX11=1 ` + -D OPENCV_ENABLE_NONFREE=ON ` + -D BUILD_SHARED_LIBS=OFF ` + -D CPU_BASELINE=NEON ` + -D CPU_DISPATCH="" ` + -D CV_ENABLE_INTRINSICS=OFF ` + -D ENABLE_PRECOMPILED_HEADERS=OFF ` + C:\opencv + + msbuild INSTALL.vcxproj /t:build /p:Configuration=Release /p:Platform=ARM64 /m:2 + + - name: Copy missing libraries to install directory + shell: powershell + run: | + Write-Host "Searching for third-party libraries..." + $thirdPartyLibs = @() + + if (Test-Path "C:\opencv-build\3rdparty\lib\Release") { + $thirdPartyLibs += Get-ChildItem C:\opencv-build\3rdparty\lib\Release\*.lib + } + + if (Test-Path "C:\opencv-build\lib\Release") { + $thirdPartyLibs += Get-ChildItem C:\opencv-build\lib\Release\*.lib + } + + if ($thirdPartyLibs.Count -gt 0) { + Copy-Item $thirdPartyLibs -Destination C:\opencv-build\install\ARM64\vc17\staticlib\ -Force -ErrorAction SilentlyContinue + Write-Host "Copied $($thirdPartyLibs.Count) libraries" + } else { + Write-Host "No third-party libraries found to copy" + } + + Write-Host "`nLibraries in install directory:" + Get-ChildItem C:\opencv-build\install\ARM64\vc17\staticlib\*.lib | Select-Object Name + + # Create stubs for missing libraries that are referenced but not used (DNN/GAPI disabled) + $stubLibs = @("libprotobuf.lib", "ade.lib") + foreach ($lib in $stubLibs) { + $stubPath = "C:\opencv-build\install\ARM64\vc17\staticlib\$lib" + if (-not (Test-Path $stubPath)) { + New-Item -ItemType File -Path $stubPath -Force | Out-Null + Write-Host "Created stub $lib (not used)" + } + } + + - name: Install vcpkg dependencies for OpenCvSharpExtern + shell: powershell + run: | + # Use VCPKG_INSTALLATION_ROOT which is the standard variable on GitHub runners + $vcpkgRoot = if ($env:VCPKG_INSTALLATION_ROOT) { $env:VCPKG_INSTALLATION_ROOT } else { $env:VCPKG_ROOT } + Write-Host "Installing libjpeg-turbo via vcpkg at: $vcpkgRoot" + & "$vcpkgRoot\vcpkg" install libjpeg-turbo:arm64-windows-static + & "$vcpkgRoot\vcpkg" integrate install + + # Copy vcpkg libraries to OpenCV install directory so linker can find them + $vcpkgLibPath = "$vcpkgRoot\installed\arm64-windows-static\lib" + if (Test-Path $vcpkgLibPath) { + Write-Host "Copying vcpkg libraries from: $vcpkgLibPath" + Copy-Item "$vcpkgLibPath\*.lib" -Destination C:\opencv-build\install\ARM64\vc17\staticlib\ -Force + Write-Host "Copied vcpkg libraries to OpenCV install directory" + } + + - name: Build OpenCVSharp Native + shell: powershell + run: | + $cmakeFile = "src\OpenCvSharpExtern\CMakeLists.txt" + $content = Get-Content $cmakeFile -Raw + + # Exclude problematic cpp files + $replacement = "file(GLOB OPENCVSHARP_FILES *.cpp)`nlist(FILTER OPENCVSHARP_FILES EXCLUDE REGEX `".*/dnn\.cpp$`")`nlist(FILTER OPENCVSHARP_FILES EXCLUDE REGEX `".*/dnn_superres\.cpp$`")`nlist(FILTER OPENCVSHARP_FILES EXCLUDE REGEX `".*/text\.cpp$`")`nlist(FILTER OPENCVSHARP_FILES EXCLUDE REGEX `".*/wechat_qrcode\.cpp$`")`nlist(FILTER OPENCVSHARP_FILES EXCLUDE REGEX `".*/cuda\.cpp$`")" + $content = $content -replace 'file\(GLOB OPENCVSHARP_FILES \*\.cpp\)', $replacement + + # Fix ${the_module} references - replace with OpenCvSharpExtern + $content = $content -replace '\$\{the_module\}', 'OpenCvSharpExtern' + + # Comment out the problematic iconv calls + $content = $content -replace 'ocv_target_link_libraries\(OpenCvSharpExtern Iconv::Iconv\)', '# ocv_target_link_libraries(OpenCvSharpExtern Iconv::Iconv)' + $content = $content -replace 'ocv_target_compile_definitions\(OpenCvSharpExtern PRIVATE "NO_ICONV=1"\)', '# ocv_target_compile_definitions(OpenCvSharpExtern PRIVATE "NO_ICONV=1")' + + Set-Content $cmakeFile -Value $content + + # Fix include_opencv.h to comment out missing headers + $includeFile = "src\OpenCvSharpExtern\include_opencv.h" + $includeContent = Get-Content $includeFile -Raw + $includeContent = $includeContent -replace '#include ', '// #include // Disabled' + $includeContent = $includeContent -replace '#include ', '// #include // Disabled' + $includeContent = $includeContent -replace '#include ', '// #include // Disabled' + $includeContent = $includeContent -replace '#include ', '// #include // Disabled' + Set-Content $includeFile -Value $includeContent + + New-Item -ItemType Directory -Force -Path build_native | Out-Null + Set-Location build_native + + # Don't use vcpkg toolchain for OpenCvSharpExtern - OpenCV already has all dependencies + # Using vcpkg toolchain causes incorrect library paths to be embedded in .vcxproj + Write-Host "Configuring OpenCvSharpExtern without vcpkg toolchain..." + + cmake -G "Visual Studio 17 2022" -A ARM64 ` + -D CMAKE_BUILD_TYPE=Release ` + -D OpenCV_DIR=C:\opencv-build\install\ARM64\vc17\staticlib ` + -D CMAKE_INSTALL_PREFIX="$PWD\install" ` + -D CMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded ` + ..\src\OpenCvSharpExtern + + # Fix hardcoded jpeg.lib path in generated .vcxproj file + Write-Host "Fixing jpeg.lib path in OpenCvSharpExtern.vcxproj..." + $vcxprojFile = "OpenCvSharpExtern.dir\Release\OpenCvSharpExtern.vcxproj" + if (Test-Path $vcxprojFile) { + $vcxprojContent = Get-Content $vcxprojFile -Raw + $vcxprojContent = $vcxprojContent -replace 'C:\\a\\opencvsharp\.win\.arm64\\opencvsharp\.win\.arm64\\vcpkg\\installed\\arm64-windows-static\\lib\\jpeg\.lib', 'C:\opencv-build\install\ARM64\vc17\staticlib\jpeg.lib' + Set-Content $vcxprojFile -Value $vcxprojContent + Write-Host "Fixed jpeg.lib path in vcxproj" + } + + # Also fix in the main vcxproj if it exists + $mainVcxproj = "OpenCvSharpExtern.vcxproj" + if (Test-Path $mainVcxproj) { + $mainContent = Get-Content $mainVcxproj -Raw + $mainContent = $mainContent -replace 'C:\\a\\opencvsharp\.win\.arm64\\opencvsharp\.win\.arm64\\vcpkg\\installed\\arm64-windows-static\\lib\\jpeg\.lib', 'C:\opencv-build\install\ARM64\vc17\staticlib\jpeg.lib' + Set-Content $mainVcxproj -Value $mainContent + Write-Host "Fixed jpeg.lib path in main vcxproj" + } + + msbuild OpenCVSharpExtern.sln /t:build /p:Configuration=Release /p:Platform=ARM64 /m:2 + + + - name: Upload Native Artifacts + uses: actions/upload-artifact@v4 + with: + name: opencvsharp-native-arm64-windows + path: | + build_native/Release/OpenCvSharpExtern.dll + build_native/Release/OpenCvSharpExtern.lib + build_native/Release/OpenCvSharpExtern.pdb From ad7fc26fd62ee6af0ee4005258bb2a30ed2c7fc4 Mon Sep 17 00:00:00 2001 From: xavave Date: Wed, 22 Oct 2025 23:35:03 +0200 Subject: [PATCH 2/9] Fix jpeg.lib path in OpenCvSharpExtern.vcxproj for better maintainability --- .github/workflows/build-win-arm64.yml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-win-arm64.yml b/.github/workflows/build-win-arm64.yml index f660e23a7..23d7d1c04 100644 --- a/.github/workflows/build-win-arm64.yml +++ b/.github/workflows/build-win-arm64.yml @@ -133,6 +133,10 @@ jobs: - name: Build OpenCVSharp Native shell: powershell run: | + # Define paths at the beginning for better maintainability + $oldJpegPath = 'C:\\a\\opencvsharp\.win\.arm64\\opencvsharp\.win\.arm64\\vcpkg\\installed\\arm64-windows-static\\lib\\jpeg\.lib' + $newJpegPath = 'C:\opencv-build\install\ARM64\vc17\staticlib\jpeg.lib' + $cmakeFile = "src\OpenCvSharpExtern\CMakeLists.txt" $content = Get-Content $cmakeFile -Raw @@ -172,21 +176,21 @@ jobs: -D CMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded ` ..\src\OpenCvSharpExtern - # Fix hardcoded jpeg.lib path in generated .vcxproj file - Write-Host "Fixing jpeg.lib path in OpenCvSharpExtern.vcxproj..." + # Fix hardcoded jpeg.lib path in generated .vcxproj files + Write-Host "Fixing jpeg.lib path in OpenCvSharpExtern.vcxproj files..." $vcxprojFile = "OpenCvSharpExtern.dir\Release\OpenCvSharpExtern.vcxproj" if (Test-Path $vcxprojFile) { $vcxprojContent = Get-Content $vcxprojFile -Raw - $vcxprojContent = $vcxprojContent -replace 'C:\\a\\opencvsharp\.win\.arm64\\opencvsharp\.win\.arm64\\vcpkg\\installed\\arm64-windows-static\\lib\\jpeg\.lib', 'C:\opencv-build\install\ARM64\vc17\staticlib\jpeg.lib' + $vcxprojContent = $vcxprojContent -replace $oldJpegPath, $newJpegPath Set-Content $vcxprojFile -Value $vcxprojContent - Write-Host "Fixed jpeg.lib path in vcxproj" + Write-Host "Fixed jpeg.lib path in release vcxproj" } # Also fix in the main vcxproj if it exists $mainVcxproj = "OpenCvSharpExtern.vcxproj" if (Test-Path $mainVcxproj) { $mainContent = Get-Content $mainVcxproj -Raw - $mainContent = $mainContent -replace 'C:\\a\\opencvsharp\.win\.arm64\\opencvsharp\.win\.arm64\\vcpkg\\installed\\arm64-windows-static\\lib\\jpeg\.lib', 'C:\opencv-build\install\ARM64\vc17\staticlib\jpeg.lib' + $mainContent = $mainContent -replace $oldJpegPath, $newJpegPath Set-Content $mainVcxproj -Value $mainContent Write-Host "Fixed jpeg.lib path in main vcxproj" } From 54ab10e7493d81c45c2364c0fe851294922d6123 Mon Sep 17 00:00:00 2001 From: xavave Date: Thu, 23 Oct 2025 00:05:13 +0200 Subject: [PATCH 3/9] Add directory verification before accessing CMakeLists.txt in build workflow --- .github/workflows/build-win-arm64.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/build-win-arm64.yml b/.github/workflows/build-win-arm64.yml index 23d7d1c04..6aad25c6f 100644 --- a/.github/workflows/build-win-arm64.yml +++ b/.github/workflows/build-win-arm64.yml @@ -137,6 +137,13 @@ jobs: $oldJpegPath = 'C:\\a\\opencvsharp\.win\.arm64\\opencvsharp\.win\.arm64\\vcpkg\\installed\\arm64-windows-static\\lib\\jpeg\.lib' $newJpegPath = 'C:\opencv-build\install\ARM64\vc17\staticlib\jpeg.lib' + # Verify we're in the correct directory + if (-not (Test-Path "src\OpenCvSharpExtern\CMakeLists.txt")) { + Write-Error "CMakeLists.txt not found. Current directory: $PWD" + Get-ChildItem + exit 1 + } + $cmakeFile = "src\OpenCvSharpExtern\CMakeLists.txt" $content = Get-Content $cmakeFile -Raw From ad41da9f79e91427ff1f9d55924746d35754d544 Mon Sep 17 00:00:00 2001 From: xavave Date: Thu, 23 Oct 2025 00:10:55 +0200 Subject: [PATCH 4/9] Add step to clone OpenCVSharp source code and copy files in build workflow --- .github/workflows/build-win-arm64.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/build-win-arm64.yml b/.github/workflows/build-win-arm64.yml index 6aad25c6f..c95be5ef6 100644 --- a/.github/workflows/build-win-arm64.yml +++ b/.github/workflows/build-win-arm64.yml @@ -14,6 +14,18 @@ jobs: with: submodules: recursive + - name: Clone OpenCVSharp source code + shell: powershell + run: | + Write-Host "Cloning OpenCVSharp repository..." + git clone --depth 1 --branch 5.2.0 https://github.com/shimat/opencvsharp.git opencvsharp-source + + # Copy source files to our repository structure + Write-Host "Copying source files..." + Copy-Item -Path "opencvsharp-source\src\*" -Destination "src\" -Recurse -Force + + Write-Host "Source files copied successfully" + - name: Setup MSBuild uses: microsoft/setup-msbuild@v2 From 9954711161d4d5a968f9e594349d77f466acaa54 Mon Sep 17 00:00:00 2001 From: xavave Date: Thu, 23 Oct 2025 00:13:26 +0200 Subject: [PATCH 5/9] Remove specific branch reference when cloning OpenCVSharp repository in build workflow --- .github/workflows/build-win-arm64.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-win-arm64.yml b/.github/workflows/build-win-arm64.yml index c95be5ef6..1fe5294fc 100644 --- a/.github/workflows/build-win-arm64.yml +++ b/.github/workflows/build-win-arm64.yml @@ -18,7 +18,7 @@ jobs: shell: powershell run: | Write-Host "Cloning OpenCVSharp repository..." - git clone --depth 1 --branch 5.2.0 https://github.com/shimat/opencvsharp.git opencvsharp-source + git clone --depth 1 https://github.com/shimat/opencvsharp.git opencvsharp-source # Copy source files to our repository structure Write-Host "Copying source files..." From 58b2e9d079323b6ec6492e15fc89f774c9bcc8b1 Mon Sep 17 00:00:00 2001 From: xavave Date: Thu, 23 Oct 2025 00:14:52 +0200 Subject: [PATCH 6/9] Refactor source cloning step to ensure removal of existing folders before copying files --- .github/workflows/build-win-arm64.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/build-win-arm64.yml b/.github/workflows/build-win-arm64.yml index 1fe5294fc..4e59475c9 100644 --- a/.github/workflows/build-win-arm64.yml +++ b/.github/workflows/build-win-arm64.yml @@ -20,6 +20,13 @@ jobs: Write-Host "Cloning OpenCVSharp repository..." git clone --depth 1 https://github.com/shimat/opencvsharp.git opencvsharp-source + # Remove existing source folders to avoid conflicts + Write-Host "Removing existing source folders..." + Remove-Item -Path "src\OpenCvSharp" -Recurse -Force -ErrorAction SilentlyContinue + Remove-Item -Path "src\OpenCvSharpExtern" -Recurse -Force -ErrorAction SilentlyContinue + Remove-Item -Path "src\OpenCvSharp.Extensions" -Recurse -Force -ErrorAction SilentlyContinue + Remove-Item -Path "src\OpenCvSharp.WpfExtensions" -Recurse -Force -ErrorAction SilentlyContinue + # Copy source files to our repository structure Write-Host "Copying source files..." Copy-Item -Path "opencvsharp-source\src\*" -Destination "src\" -Recurse -Force From 8bf3bef7ab839d7d87ea3eec2a138e8d883b648f Mon Sep 17 00:00:00 2001 From: xavave Date: Thu, 23 Oct 2025 00:18:05 +0200 Subject: [PATCH 7/9] Refactor source removal step to delete the entire src directory before copying files --- .github/workflows/build-win-arm64.yml | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build-win-arm64.yml b/.github/workflows/build-win-arm64.yml index 4e59475c9..d69637d23 100644 --- a/.github/workflows/build-win-arm64.yml +++ b/.github/workflows/build-win-arm64.yml @@ -20,16 +20,15 @@ jobs: Write-Host "Cloning OpenCVSharp repository..." git clone --depth 1 https://github.com/shimat/opencvsharp.git opencvsharp-source - # Remove existing source folders to avoid conflicts - Write-Host "Removing existing source folders..." - Remove-Item -Path "src\OpenCvSharp" -Recurse -Force -ErrorAction SilentlyContinue - Remove-Item -Path "src\OpenCvSharpExtern" -Recurse -Force -ErrorAction SilentlyContinue - Remove-Item -Path "src\OpenCvSharp.Extensions" -Recurse -Force -ErrorAction SilentlyContinue - Remove-Item -Path "src\OpenCvSharp.WpfExtensions" -Recurse -Force -ErrorAction SilentlyContinue - - # Copy source files to our repository structure + # Remove existing src directory completely and recreate it + Write-Host "Removing existing src directory..." + if (Test-Path "src") { + Remove-Item -Path "src" -Recurse -Force + } + + # Copy the entire src directory from cloned repo Write-Host "Copying source files..." - Copy-Item -Path "opencvsharp-source\src\*" -Destination "src\" -Recurse -Force + Copy-Item -Path "opencvsharp-source\src" -Destination "." -Recurse -Force Write-Host "Source files copied successfully" From 1034f87ab06c7f821018d9220f0ab1f37defbb9a Mon Sep 17 00:00:00 2001 From: xavave Date: Thu, 23 Oct 2025 00:21:41 +0200 Subject: [PATCH 8/9] Fix CMake regex for excluding problematic cpp files in OpenCvSharpExtern --- .github/workflows/build-win-arm64.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-win-arm64.yml b/.github/workflows/build-win-arm64.yml index d69637d23..5a13b8ab8 100644 --- a/.github/workflows/build-win-arm64.yml +++ b/.github/workflows/build-win-arm64.yml @@ -165,8 +165,8 @@ jobs: $cmakeFile = "src\OpenCvSharpExtern\CMakeLists.txt" $content = Get-Content $cmakeFile -Raw - # Exclude problematic cpp files - $replacement = "file(GLOB OPENCVSHARP_FILES *.cpp)`nlist(FILTER OPENCVSHARP_FILES EXCLUDE REGEX `".*/dnn\.cpp$`")`nlist(FILTER OPENCVSHARP_FILES EXCLUDE REGEX `".*/dnn_superres\.cpp$`")`nlist(FILTER OPENCVSHARP_FILES EXCLUDE REGEX `".*/text\.cpp$`")`nlist(FILTER OPENCVSHARP_FILES EXCLUDE REGEX `".*/wechat_qrcode\.cpp$`")`nlist(FILTER OPENCVSHARP_FILES EXCLUDE REGEX `".*/cuda\.cpp$`")" + # Exclude problematic cpp files (use double backslashes for CMake regex) + $replacement = "file(GLOB OPENCVSHARP_FILES *.cpp)`nlist(FILTER OPENCVSHARP_FILES EXCLUDE REGEX `".*/dnn\\.cpp$`")`nlist(FILTER OPENCVSHARP_FILES EXCLUDE REGEX `".*/dnn_superres\\.cpp$`")`nlist(FILTER OPENCVSHARP_FILES EXCLUDE REGEX `".*/text\\.cpp$`")`nlist(FILTER OPENCVSHARP_FILES EXCLUDE REGEX `".*/wechat_qrcode\\.cpp$`")`nlist(FILTER OPENCVSHARP_FILES EXCLUDE REGEX `".*/cuda\\.cpp$`")" $content = $content -replace 'file\(GLOB OPENCVSHARP_FILES \*\.cpp\)', $replacement # Fix ${the_module} references - replace with OpenCvSharpExtern From 7b22b6cc4ea9a33afd830bda0298d2eefabcb5d1 Mon Sep 17 00:00:00 2001 From: xavave Date: Thu, 23 Oct 2025 00:25:17 +0200 Subject: [PATCH 9/9] Improve solution file detection in OpenCVSharp build process --- .github/workflows/build-win-arm64.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-win-arm64.yml b/.github/workflows/build-win-arm64.yml index 5a13b8ab8..a444cea91 100644 --- a/.github/workflows/build-win-arm64.yml +++ b/.github/workflows/build-win-arm64.yml @@ -220,7 +220,17 @@ jobs: Write-Host "Fixed jpeg.lib path in main vcxproj" } - msbuild OpenCVSharpExtern.sln /t:build /p:Configuration=Release /p:Platform=ARM64 /m:2 + # Find the actual solution file generated by CMake + Write-Host "Looking for solution file..." + $slnFile = Get-ChildItem -Filter "*.sln" | Select-Object -First 1 + if ($slnFile) { + Write-Host "Found solution file: $($slnFile.Name)" + msbuild $slnFile.Name /t:build /p:Configuration=Release /p:Platform=ARM64 /m:2 + } else { + Write-Error "No .sln file found in build directory" + Get-ChildItem + exit 1 + } - name: Upload Native Artifacts