I need to dynamically load a .NET managed assembly into a Unix/Linux shared object that itself exports four functions is C.
What I have tried:
I have an existing code base written in C# for .NET 5/Core 3 that I need to dynamically load into a shared object written in C running on Linux/Unix, and I can't find any information as to how that can be done.
There is no end of tutorials explaining how to load a native C library into a C# assembly (unmanaged to managed), and of course I can use C++/CLI to dynamically load a managed .NET assembly (managed to unmanaged) if running in Windows, but C++/CLI is not part of .NET Standard and so isn't an option when running in Linux/Unix.
I presume crossing the barrier from managed to unmanaged code in Linux/Unix is a problem that has already been solved, but if so, I can't find the solution.