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

前端 未结 6 1779
野的像风
野的像风 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 10:17

    This is an interesting dilemma. I've never heard of a problem loading native .DLLs from C++/CLI after a call into it from C# before. I can only assume the problem is as @Daniel L suggested, and that your .DLL simply isn't in a path the assembly loader can find.

    If Daniel's suggestion doesn't work out, I suggest you try statically linking the native C code to the C++/CLI program, if you can. That would certainly solve the problem, as the .DLL would then be entirely absorbed into the C++/CLI .DLL.

提交回复
热议问题