How do I resolve “Please make sure that the file is accessible and that it is a valid assembly or COM component”?

后端 未结 7 1879
北荒
北荒 2020-11-27 16:17

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 :-

<
7条回答
  •  醉话见心
    2020-11-27 16:31

    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)

提交回复
热议问题