与cvextern.dll文件有关的错误(C#中的opencv) [英] error concerned with cvextern.dll file (opencv in C#)

查看:164
本文介绍了与cvextern.dll文件有关的错误(C#中的opencv)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我添加此文件(cvextern.dll)进行引用或使用cmd中的命令csc时.出现此错误

when I add this file (cvextern.dll) to reference or I use the command csc from cmd .. I get this error

严重错误CS0009:无法打开元数据文件"file_path"-'试图加载格式错误的程序. '

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?

谢谢大家

推荐答案

Hans Passant的评论正确.使用EMGU时,文件cvextern.dll应该复制到运行程序的输出文件夹中,或者作为现有项添加到项目中.然后在解决方案资源管理器中选择该项目,然后在属性面板复制到输出目录"中将其属性更改为CopyAlways.请参见 http://www.emgu.com/wiki/index.php/Download_And_Installation有关文件正确使用的更多信息.

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.

欢呼 克里斯

这篇关于与cvextern.dll文件有关的错误(C#中的opencv)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆