tags:

views:

1126

answers:

3

I've created a dll using managed C++. Now I'm trying to use it from C#. I've added the Object to project references. Object browser shows the object in the dll correcly, path to the dll in object browser corresponds to the actual path.

However, when I run the C# program it complains:

Unhandled Exception: System.IO.FileNotFoundException: The specified module could not be found. (Exception from HRESULT: 0x8007007E)

Any idea what else have to be done?

Thanks.

+5  A: 

I think that you're missing the other assemblies or dll's references by your managed C++ assembly.

plinth
True, one of the dlls used wasn't on the path. Thanks.
A: 

Does your managed C++ assembly have an other dependencies, including unmanaged dlls? You'll see this error at runtime if your referenced assembly fails to load a dependency.

Stu Mackellar
A: 

Are you running the application in release on a machine without VS installed?

I only ask because I ran into a similar problem here: http://stackoverflow.com/questions/230715/mixed-mode-library-and-crt-dependencies-help

if you scroll down to my answer you can see what I did that helped me.

Quintin Robinson