I'm trying to write a managed C++ wrapper for a native C++ library. I have .lib
and .h
header files. I followed the steps in http://tom-shelton.net/index.php/2008/12/11/creating-a-managed-wrapper-for-a-lib-file/
I finished wrapper, and referenced the wrapper DLL from a C# project. All build fine. However wehen I try to run C# project, it quits with exception; 'System.IO.FileNotFoundException'
. It says that it can not find my wrapper DLL or one of its dependencies.
Since I'm sure that my wrapper DLL is found, I tried to debug the missing dependency of the wrapper using Dependency Walker
. I loaded the wrapper DLL into it, and it shows that my native library DLL is missing.
Now I'm confused. I did not use the native DLL, I used lib and header. Then, why it still tries to find the native DLL file which is of course missing? Is there a configuration problem in Visual Studio?
Thanks