Skip to content
shimat edited this page Dec 22, 2013 · 2 revisions

DllNotFoundException / TypeInitializationException

  • Put all OpenCV's DLLs (e.g. opencv_core245.dll) into the same directory as the executable file (e.g. bin/Debug).
  • Check that you have installed Visual C++ Redistributable Package.

DllNotFoundException


BadImageFormatException

For 32-bit OS

  • Check that you use the x86 version of OpenCV/OpenCvSharp DLLs.

For 64-bit OS

  • Check the target platform of OpenCV you installed (x86 or x64).
  • Understand that the x64 version of OpenCvSharp is NOT for 64-bit OS but for x64 OpenCV DLLs.
  • If you installed 32-bit OpenCV, you need to use x86 version of OpenCvSharp. And change your project's target platform from "Any CPU" to "x86".

TargetPlatform

See also: http://www.broculos.net/tutorials/badimageformatexception_was_unhandled/20080307/en

Clone this wiki locally