There is a method of exporting methods from a .NET assembly as unmanaged, so it can be used as a regular unmanaged DLL by the unmanaged codes, C++ or not. This method is not well-known, but it is strictly based on the CLR standard. The problem is that is is not possible to achieve with high-level CLR languages but with IL it can be done.
The trick it to provide this functionality to high-level CLR (.NET) languages. The idea is to introduce a special attribute use to make a method as "export to unmanaged". A build tool should disassemble the assembly from its binary form to IL, modify IL code using the attribute to add the export and assemble it from modified IL to executable assembly again. A resulting assembly can be used as a regular unmanaged DLL. This build step is fully automated; and the used does not need to be familiar with IL.
You can find the solution in the following CodeProject articles:
Unmanaged code can wrap managed methods[
^],
How to Automate Exporting .NET Function to Unmanaged Programs[
^].
—SA