September 23rd, 2019

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

Will Buik
Program Manager

.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.

Author

Will Buik
Program Manager

Will is a Program manager on Visual Studio's C++ IDE team. He works on the C++ project system and design-time language features such as IntelliSense.

15 comments

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

Newest
Newest
Popular
Oldest
  • Arlie Davis

    Could you elaborate on why /clr:pure and /clr:safe are not supported? I imagine it has to do with the very different nature of the compilation pipeline on .NET Core; are these compilation options no longer meaningful, or just being dropped for practical reasons?

  • Madhu Sameena

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

  • Mark Fonnemann

    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.

  • Oliver Weichhold

    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.

  • Seetharam Raman

    That’s a very good news!

  • François Bouteruche

    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.

  • Kostas Vl

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

  • Jeff Hawson

    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!

  • László Csöndes

    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

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

      • László Csöndes

        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

        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.

  • daan verstraten

    This is great news! Keep up the great work

Feedback