The Future of C++/CLI and .NET Core 3

Will Buik

.NET Core 3.0 is now available and we have received a lot of questions about what that means for the future of C++/CLI. First, we would like to let everyone know that we are committed to supporting C++/CLI for .NET Core to enable easy interop between C++ codebases and .NET technologies such as WPF and Windows Forms. This support isn’t going to be ready when .NET Core 3.0 first ships, but it will be available in .NET Core 3.1 which ships with Visual Studio 2019 16.4 – roadmap.

C++/CLI will have full IDE support for targeting .NET Core 3.1 and higher. This support will include projects, IntelliSense, and mixed-mode debugging (IJW) on Windows. We don’t currently have plans for C++/CLI for targeting macOS or Linux. Additionally, compiling with “/clr:pure” and “/clr:safe” won’t be supported for .NET Core.

The first public previews for C++/CLI are right around the corner. Visual Studio 2019 16.4 Preview 1 includes an updated compiler with “/clr:netcore” if you want to try it out with full IDE support coming in a subsequent preview. Keep an eye on the C++ Team Blog for more info; it’s coming soon! As always, let us know if you have any questions. Feedback and suggestions can be posted on Developer Community.

15 comments

Discussion is closed. Login to edit/delete existing comments.

  • David Hunter 0

    Thanks for the work this is great news for all of us C++/CLI fans! I was wondering if you could post a simple “Hello World” Visual Studio 4.1 Preview project file somewhere, it would help us to start with something you guys are happy with.

    BTW I did look at the roadmap page but it seems to only go out to Q3 2019 which is basically now.

    • Will BuikMicrosoft employee 0

      We are still working on the IDE and MSBuild integration, so I can’t share a sample project quite yet. Once it’s available, likely with 16.4 Preview 2 or 3, we will post an update on the blog. That post will include many more details including how to get .NET Core C++/CLI project up and running.

  • daan verstraten 0

    This is great news! Keep up the great work

  • László Csöndes 0

    Great news! I guess C++/CLI is still on life support and not getting support for newer .NET features such as extension methods or named tuple members?

    • Mark Fonnemann 0

      You can write extension methods in C++/CLI.

      • László Csöndes 0

        There was no language support for declaring or consuming extension methods last time I checked, the only option you had was manually adding the attributes and then using the ClassName::Method(whatWouldBeThis, …); syntax to call them, which gets very ugly and verbose if you’re using an API that was originally designed as a set of extension methods that you’re supposed to chain (ASP.NET Core, Rx, or even LINQ itself for instance).

        • Mark Fonnemann 0

          I see what you are saying. Defining the enums in C++/CLI for consumption C# works well but if you want to define and consume within that same (or another) C++/CLI project it can get ugly. Agree 100% that this should be improved.

  • Jeff Hawson 0

    This is great. Nothing matches C++/CLI in terms of its ability to wrap complex native APIs for a .NET audience. I hope that Microsoft continues to invest in this technology. It will be very exciting if Linux support is eventually offered — that would unlock a lot of possibilities!

  • Kostas Vl 0

    Exciting to have any news about this technology at all! Intellisense sounds great. Here’s to more.

  • François Bouteruche 0

    It would be awesome to add in your plan the support for macOS and Linux. I can imagine great use cases where I could easily wrap native image processing libraries in my .NET apps.

  • Seetharam Raman 0

    That’s a very good news!

  • Oliver Weichhold 0

    Considering that the majority of our workloads are now developed on Windows but run in inside Linux containers in production, not supporting Linux is unfortunate.

  • Mark Fonnemann 0

    Any chance for some modern c# features? String interpolation seems like low hanging fruit. ValueTuples would be nice as well. There’s probably something I’m forgetting here.

  • Madhu Sameena 0

    Can we use dotnet publish for C++ CLI project?

Feedback usabilla icon