Homepage Forums How-to and troubleshooting "Error while creating UI…" Reply To: "Error while creating UI…"

Antony DavisonAntony Davison

i am getting this error on win7x64 too — my build is too mature to start again (
maybe there some clues here


x64 Architecture and the EMGU.CV.Invoke Exception

If you are running an x64 system or designing for them you will have to download separate DLL’s. The steps on forming a project are identical however you will need to change an additional build parameter. Right click on your project file in the solution explorer and select “Properties” at the bottom. Select the “Build” tab from the ribbon bar on the right of this window. There will be an option for Platform Target: with a drop down menu change this from x86 to x64.

Hint: If you are using the express version of visual studio you may not see the x64 option in such a case go to menu option Tools > Options. In this window using the arrows to the left hand side to expand and collapse options. Select “Projects and Solutions” and select the Show advanced build configurations check box.

This will now allow the compilation to run if this is not done correctly. As soon as you access any EMGU code an exception will be thrown ‘EMGU.CV.Invoke’ through an exception with the ‘InnerException’ “An attempt was made to load a program with an incorrect format….”.

Emgu CV #5: The type initializer for ‘Emgu.CV.CvInvoke’ threw an exception

Remove Emgu CV Invoke Error in 64 bit windows!



You must be logged in to view attached files.