Repository navigation
Fix: correct FFmpeg DLL path in runtime.win package and detect dotnet pack failures - #1883
Merged
Merged
Conversation
…otnet pack failures FFmpeg is now statically linked into OpenCvSharpExtern.dll via vcpkg (x64-windows-static), so opencv_videoio_ffmpeg4130_64.dll is no longer installed and should not be packaged. Also add $LASTEXITCODE checks after each dotnet command so pack failures are no longer silently swallowed by PowerShell's $ErrorActionPreference = "Stop". Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… step Replace the repeated $LASTEXITCODE checks with $PSNativeCommandUseErrorActionPreference = $true (PowerShell 7.3+), which makes all native commands respect $ErrorActionPreference = "Stop". Also switch shell from powershell (Windows PowerShell 5.1) to pwsh (PowerShell 7) required for this feature. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…s step The DLL is installed to opencv_artifacts/x64/vc17/bin/ (Visual Studio generator layout), not the previously referenced opencv_artifacts/bin/. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…im variants The previous check only validated OpenCvSharp4.runtime.win.slim and OpenCvSharp4.Windows.Slim, so missing non-slim packages (runtime.win, Windows) went undetected and publish proceeded with incomplete artifacts. Now all 12 expected packages are checked explicitly. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThis PR enhances the OpenCvSharp NuGet packaging pipeline by updating native DLL artifact sources, fixing PowerShell error handling during package creation, and generalizing package validation across multiple target platforms and architectures before publication. ChangesNuGet Packaging and Publication Pipeline
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
This was referenced May 30, 2026
4 tasks done
This was referenced Jun 22, 2026
This was referenced Jun 26, 2026
This was referenced Jun 29, 2026
2 tasks done
This was referenced Jul 6, 2026
This was referenced Aug 10, 2026
This was referenced Sep 9, 2026
Merged
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
nuget/OpenCvSharp4.runtime.win.csproj: Fix the path toopencv_videoio_ffmpeg4130_64.dll. The Visual Studio generator installs it toopencv_artifacts/x64/vc17/bin/, notopencv_artifacts/bin/, causingdotnet packto fail with "Could not find a part of the path"..github/workflows/windows.yml: SwitchPack NuGet packagesstep fromshell: powershell(Windows PowerShell 5.1) toshell: pwsh(PowerShell 7) and add$PSNativeCommandUseErrorActionPreference = $true. This makes native command failures (e.g.dotnet pack) respect$ErrorActionPreference = "Stop", so errors are no longer silently ignored.Root cause
dotnet pack nuget/OpenCvSharp4.runtime.win.csprojwas failing with:Because the
Pack NuGet packagesstep did not detect native command failures, execution continued silently. This caused a cascade:OpenCvSharp4.Windowsalso failed to pack (it depends onOpenCvSharp4.runtime.winbeing present in the local artifact source). Both packages were missing from the NuGet publish run.The correct DLL path was confirmed by inspecting the
opencv_artifactsdirectory structure in CI:opencv_artifacts/x64/vc17/bin/opencv_videoio_ffmpeg4130_64.dllTest plan
windows.ymlCI completes successfully and bothOpenCvSharp4.runtime.win.*.nupkgandOpenCvSharp4.Windows.*.nupkgare produceddotnet packstep fails in the future, the workflow step fails immediatelySummary by CodeRabbit
Release Notes