C# to C++/CLI to C DLL System.IO.FileNotFoundException

前端 未结 6 1782
野的像风
野的像风 2021-01-05 09:52

I\'m getting System.IO.FileNotFoundException: The specified module could not be found when running C# code that calls a C++/CLI assembly which in turn

6条回答
  •  北荒
    北荒 (楼主)
    2021-01-05 09:59

    Are the C and C++ DLLs in the same directory as the C# assembly that's executing?

    You may have to change your project output settings so that the C# assembly and the other DLLs all end up in the same folder.

    I've often used the Dependency Walker in cases like this; it's a sanity check that shows that all the dependencies can actually be found.

    Once your app is running, you may also want to try out Process Monitor on the code you are running, to see which DLLs are being referenced, and where they are located.

提交回复
热议问题