With the introduction of .net Core, and more recently, .net 5, cross-platform .net/C# is relatively easy. With this in mind, I'm working towards an application that would use .net 5/C#, but there is some code that I want to keep in the C++/native domain. With C# only, one can even publish to other platforms from the development one. I'm willing to give up on that.
Now, how can one keep the project cross-platform?
I've been looking everywhere an there doesn't seem to be a great option anywhere...
Maybe this solution from Xamarin? I'm not sure it'll translate to Desktop, or that it can be automatized on a CI/CD...
But other than that, everybody seems to get away with their own janky way.
Does anybody have pointers about C(++)/C# integration that's cross platform?
Edit 1:
My problem is not to make the interop per se. I have successfully used SWIG and I know about P/Invoke, C-compatible ABIs and etc.
My problem is build system/deployment. So far I have to copy files around. But how can one have an integrated build system? I want that when building my dotnet app for the C++ libraries to compile, for example.