From a native application (C++ [C++ Builder/RAD Studio 12, 64bit clang]), C# assemblies are accessed via a narrow C++/CLI wrapper DLL (with a C-style API) [.net8, x64 is used]. So far this has not been a problem, now I am trying to connect to LDAP/Active Directory again.
My C# DLL with the accesses to LDAP works so far (tested by a simple C# console application), but if I call the same functions via the C++/CLI-dll from the native code, an exception is thrown that it cannot load an assembly:
…”Could not load file or assambly ‘System.DirectoryServices.Protocols, Version=8.0.0.0, Culture=neutral, PublicKeyToken”…
All files are in the same directory as the native application (including other .net dlls that were compiled using Publish). Does anyone suspect what could be causing the problem and possibly a possible solution?
I have tested several calls into the C++/CLI wrapper dll, only the ones with the LDAP access throw errors from the native code.