0

I've got an app that uses the OpenCvSharp4.Windows NuGet package. At runtime when I try to use it, it throws an exception with this message and call stack:

15:51:31.889 [  1] ERROR - TryProcessNext: Exception of type: 'System.TypeInitializationException'  Message='Unable to load DLL 'OpenCvSharpExtern' or one of its dependencies: The specified module could not be found. (0x8007007E)': 
   at OpenCvSharp.Internal.NativeMethods.core_Mat_zeros1(Int32 rows, Int32 cols, Int32 type, IntPtr& returnValue)
   at OpenCvSharp.Mat.Zeros(Int32 rows, Int32 cols, MatType type)

Now I have seen from another thread here that this used to be a problem when people neglected to add the platform specific NuGet package. But the description of this OpenCVSharp4.Windows package on NuGet is

All-in-one package for Windows Users

That would make me think otherwise. As a test I tried adding the OpenCVSharp4.runtime.win package to my app and it did not appear to add any new DLLs to my build output runtimes subfolders. Nothing that I could add to my installer.

So do I need this (or some other) additional package? Or could there be some other reason OpenCV cannot find what DLLs it needs to use cv::Mat?

Joe
  • 5,394
  • 3
  • 23
  • 54

0 Answers0