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

In my case I had to register the .dll.

To do so, open cmd.exe (the console) with admin rights and type:

regsvr32 "foo.dll"

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)


Make sure the required dlls are exported (or copied manually) to the bin folder when building your application.

Tags:

C#

.Net

Dll

Opencv