none
What is the assembly searching path in InterOp CLI/CPP and native C? RRS feed

  • Question

  • Hi All,

    I am experiencing an aseembly loading issue in my interop project, i.e. there are 3 VS projects, A is a native C project that references B via static binding, in another word, A invokes B's functions if you like; B is a CLI wrapper, which in turn statically references C's objects; C is a CS project which is purely .NET code. Both B and C are signed with strong name, and their AssemblyInfo.cs and AssemblyInfo.cpp files are updated with their key files.

    Both B and C are registered in GAC using gacutil.exe V4.0. A has a reference to B.dll from the folder where B.dll is registered, B has a reference to C in the same forlder where C is registered.

    When I run the program from A, it fails with message ' The program can't start because B.dll is missing from your computer. Try reinstalling the program to fix this problem'. the only way I can make it working is copy B.dll and C.dll to the same folder of A.exe.

    How can I fix the problem?

    Thursday, November 8, 2012 12:03 PM

Answers