我想了一个解决方案:请确保该文件是可访问的,它是一个有效的程序集或COM组件 [英] I want a solution for this : Please make sure that the file is accessible and that it is a valid assembly or COM component

查看:1943
本文介绍了我想了一个解决方案:请确保该文件是可访问的,它是一个有效的程序集或COM组件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我建立了一个项目,OpenCV的在C#。它需要一个名为dll文件 cvextern.dll 。但是,添加此文件作为参考时,出现此消息: -

I am building a project with OpenCV in C#. It requires a dll file called cvextern.dll. but, when adding this file as a reference, this message appears :-

参考cvextern.dll不能添加,请确保该文件是可访问的,它是一个有效的程序集或COM组件。

我从搜索累了,我花了2天寻找该问题

I get tired from searching, I spent the past 2 days in searching for a solution for that problem

推荐答案

该文件是原生的DLL,这意味着你可以将它通过添加引用未添加到.NET项目...您可以通过的DllImport使用它(见<一href="http://msdn.microsoft.com/en-us/library/system.runtime.interopservices.dllimportattribute.aspx">http://msdn.microsoft.com/en-us/library/system.runtime.interopservices.dllimportattribute.aspx)

the file is a native DLL which means you can't add it to a .NET project via Add Reference... you can use it via DllImport (see http://msdn.microsoft.com/en-us/library/system.runtime.interopservices.dllimportattribute.aspx)

这篇关于我想了一个解决方案:请确保该文件是可访问的,它是一个有效的程序集或COM组件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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