Skip to content

Fix Windows NuGet pack: FFmpeg DLL path moved to vc18 - #1954

Merged
shimat merged 1 commit into
mainfrom
fix/windows-pack-ffmpeg-vc18
Jun 27, 2026
Merged

shimat merged 1 commit into
mainfrom
fix/windows-pack-ffmpeg-vc18

Conversation

@shimat

@shimat shimat commented Jun 27, 2026 •

Copy link
Copy Markdown
Owner

Problem

The Windows CI build job fails at the Pack NuGet packages step:

error : Could not find a part of the path '...\opencv_artifacts\x64\vc17\bin'.
[nuget/OpenCvSharp4.runtime.win.csproj]

Cause

windows.yml was updated to the Visual Studio 18 2026 generator (commits dc77c4d9, bb2da29c). OpenCV's install layout is toolset-versioned, so it now installs under opencv_artifacts/x64/**vc18**/ instead of vc17/. Confirmed from the CI build log:

-- Installing: .../opencv_artifacts/x64/vc18/bin/opencv_videoio_ffmpeg4130_64.dll

OpenCvSharp4.runtime.win.csproj still referenced the stale vc17 path for the FFmpeg DLL, so pack failed.

Fix

Update the FFmpeg DLL path in OpenCvSharp4.runtime.win.csproj from vc17 → vc18 to match the new install layout.

Scope notes:

  • UWP packages and ReleaseMaker keep vc17 — those use a separately distributed prebuilt OpenCV (opencv_world490, built with VS 2022), unrelated to this from-source build.
  • The Windows ARM64 job keeps the VS 2022 generator (a3fb3bf7) and already passes.
  • The slim package disables videoio, so it does not ship the FFmpeg DLL.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Updated the Windows x64 runtime package to include the correct FFmpeg DLL from the newer runtime artifact path, helping ensure smoother video I/O support on Windows.

The Windows CI generator was bumped to "Visual Studio 18 2026", so OpenCV
now installs to opencv_artifacts/x64/vc18/ instead of vc17/. The
runtime.win package still referenced the vc17 path for
opencv_videoio_ffmpeg4130_64.dll, causing "Pack NuGet packages" to fail
with "Could not find a part of the path '...\opencv_artifacts\x64\vc17\bin'".

Update the path to vc18 to match the install layout.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@shimat shimat self-assigned this Jun 27, 2026
@coderabbitai

coderabbitai Bot commented Jun 27, 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: 905d0af2-2b68-4296-8959-83e83c6e151e

📥 Commits

Reviewing files that changed from the base of the PR and between 6c10282 and 767e484.

📒 Files selected for processing (1)
  • nuget/OpenCvSharp4.runtime.win.csproj

📝 Walkthrough

Walkthrough

Updates the Windows runtime NuGet package entry for opencv_videoio_ffmpeg4130_64.dll to source the DLL from the vc18 artifacts path while keeping the same packed destination.

Changes

Windows runtime package path update

Layer / File(s) Summary
NuGet DLL source path update
nuget/OpenCvSharp4.runtime.win.csproj
The packaged opencv_videoio_ffmpeg4130_64.dll reference now points to opencv_artifacts/x64/vc18/... instead of opencv_artifacts/x64/vc17/..., with the same runtimes/win-x64/native output path.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

  • shimat/opencvsharp#1883: Updates the same NuGet project and DLL packaging path for opencv_videoio_ffmpeg4130_64.dll, making it a direct prior change to compare against.
🚥 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 clearly summarizes the main change: updating the Windows NuGet pack path for the FFmpeg DLL to vc18.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/windows-pack-ffmpeg-vc18

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.

@shimat
shimat merged commit 80a9eab into main Jun 27, 2026
14 checks passed
@shimat
shimat deleted the fix/windows-pack-ffmpeg-vc18 branch June 27, 2026 02:53
@shimat shimat added the bug Confirmed defect in OpenCvSharp label Jul 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Confirmed defect in OpenCvSharp

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant