问题
when I add this file (cvextern.dll) to reference or I use the command csc from cmd .. I get this error
fatal error CS0009: Metadata file "file_path" could not be opened -- 'An attempt was made to load a program with an incorrect format. '
why is that happen? How can I solve it?
thank you all
回答1:
The comment by Hans Passant is correct. The file cvextern.dll when using EMGU should either be copied into your output folder where your program is running or added to your project as an existing item. Then select the item in solution explorer and change its properties in the properties panel "Copy to Output Directory" to CopyAlways. See http://www.emgu.com/wiki/index.php/Download_And_Installation for more information on proper use of the files.
Cheers Chris
来源:https://stackoverflow.com/questions/7078466/error-concerned-with-cvextern-dll-file-opencv-in-c