0

I'm connecting from c++ solution from CLR project to the C# dll. Now I do it using

#using <MyDotNet.dll>

But for this I need this dll to be present at a compile time, which became a problem. Is there a LoadLibrary and GetProcAddress analogue function for using C# dll from CLR code, so I don't need to have dll at a compile time and the needed method will be invoked from the dll at the runtime?

Bruice
  • 543
  • 3
  • 11
  • @jdweng I don't really understand. You mean to write in my CLR project class with same method name in the same namespace name that the C# method I'm calling? I think it will be some inking error when I will build my C++ solution – Bruice Feb 12 '21 at 10:51
  • see for example https://stackoverflow.com/questions/35682347/loading-library-dynamically – Alan Birtles Feb 12 '21 at 10:53
  • Why would it cause a linking error. When you finish the CLR project you simply replace the dummy with the real. – jdweng Feb 12 '21 at 11:28
  • @jdweng sorry, again don't understand. Finish what? Problem is that on the compile time I should be able to compile CLR project without C# dll, and use it only in the runtime – Bruice Feb 12 '21 at 15:59
  • Your c++ project. All I'm say is to design you c++ project by determing the methods with their inputs and output. You do not have to rite the code inside the methods just define the methods. Then you can compile your c# code. Often for testing people create methods with that return test data so the c# can be debugged without the dlls. – jdweng Feb 12 '21 at 16:37

0 Answers0