The type initializer for 'Emgu.CV.CvInvoke'

2019-08-09 22:42发布

问题:

I am trying to use EmguCV to make a website in Visual Studio. Getting an error The type initializer for 'Emgu.CV.CvInvoke' threw an exception with the Inner Exception An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B).

Following are the details of my setup:

Windows 8 64-bit

VS2012

Emgu library 2.3 for Windows x64

Most of the help I saw in forums was for a project, but in case it matters, this is a website.

I have already copied all DLLs into 'Website\bin' folder. So, I doubt if that is the problem. I put these DLLs into System32 and SysWOW64 folders as well. Didn't work.

回答1:

Normally, this error occurs when you forgot to copy or include the opencv dlls or there's an error in your MSVCRT installation. You may see additional info at Emgu Wiki.