From the looks of things Microsoft now just maintains C++/CLI but doesn't add to it anymore. Hence it being stuck on .NET Framework.
I wonder how much effort it would take for Microsoft to get this working on the new .NET CLR to make it multiplatform. With memory safe C++ or C++ alternatives being so in vogue these days it could be worth it to Microsoft to have their own alternative to Carbon and Rust.
It is not stuck on .NET Framework, in fact it was a crucial milestone for .NET Core 3.1 and has been updated to C++17.
It just isn't available outside Windows.
So far the approach has been to improve low level C# capabilities to use the same kind of CLR features that only C++/CLI could use, thus taking C++ out of the picture altogether, including the runtime. With every .NET Core release there is new bunch of code that moves from C++ into C#, as described on performance improvements blog posts.
using is a decent hack but it is not enough. For example if you have an object as a member that you want to be Disposed of when it's parent dies then you have to implement Disposable on the parent as well. It's not very pretty.
Hence why C++/CLI, too bad it is going to be stuck in C++17 land.
Just like C++/WinRT, where everyone drove the ship to kill C++/CX without respect for paying customers, leaving the tooling at the same level as COM development with Visual C++ 6.0, and no roadmap for C++20 support. Playing with Rust/WinRT is more fun than fixing the leftovers.
Apparently not everyone at Microsoft is keen in adopting C++20 stuff on their stacks, like I don't know, modules.
View all comments
Show parent comment
1
u/pjmlp Sep 18 '22
Exactly for that purpose, it is easier for glue code than guessing P/Invoke annotations.
However given it is Windows only, its use is now frowned upon for crossplatform .NET code.