Skip to content

DllNotFoundException: Unable to load DLL 'OpenCvSharpExtern' or one of its dependencies #1818

@Sputnik24

Description

@Sputnik24

I updated my own NUnit Runner to Nunit.Engine 3.22.0.
My NUnit test includes the OpenCvSharp4 library and, yes, I added also OpenCvSharp4.runtime.win for Windows.

Starting my test and accessing OpenCvSharp library, I get the following exception:

System.TypeInitializationException: The type initializer for 'OpenCvSharp.Internal.NativeMethods' threw an exception.
 ---> System.DllNotFoundException: Unable to load DLL 'OpenCvSharpExtern' or one of its dependencies: Das angegebene Modul wurde nicht gefunden. (0x8007007E)
   at OpenCvSharp.Internal.NativeMethods.redirectError(CvErrorCallback errCallback, IntPtr userdata, IntPtr& prevUserdata)
   at OpenCvSharp.Internal.NativeMethods.LoadLibraries(IEnumerable`1 additionalPaths)
   at OpenCvSharp.Internal.NativeMethods..cctor()

With NUnit.Engine 3.20.2, everything is working. I see in the release notes that Assembly loading was changed. Maybe this causes the issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions