Will C++/CLI be open-sourced and supported on Linux?


My company uses C++/CLI to wrap our C++ libraries and make them available in .NET. This works great on Windows, but unfortunately, Mono does not support doing the same on Linux. It would be fantastic if we could cross-compile our C++ code to both Windows and Linux libraries, and then wrap them in C++/CLI to use in .NET on both platforms. Is this something that will be supported in Microsoft’s Linux .NET framework?


I doubt mixed assemblies will ever work on anything but Windows (though I might obviously be wrong), but what you can do, even today, to make your libraries work xplat, is instead of using a C++/CLI wrapper, create a C wrapper (this, as far as I know, can be in the same library using extern "C"), and use P/Invoke .It’s a bit more work, but can work properly across all platforms.


You might also want to take a look at https://github.com/mono/CppSharp.


Or tritaos https://github.com/tritao/clang CIL backend branch for clang.

.NET Foundation Website | Blog | Projects | Code of Conduct