Introducing .NET 5

Rich Lander [MSFT]

Today, we’re announcing that the next release after .NET Core 3.0 will be .NET 5. This will be the next big release in the .NET family.

There will be just one .NET going forward, and you will be able to use it to target Windows, Linux, macOS, iOS, Android, tvOS, watchOS and WebAssembly and more.

We will introduce new .NET APIs, runtime capabilities and language features as part of .NET 5.

From the inception of the .NET Core project, we’ve added around fifty thousand .NET Framework APIs to the platform. .NET Core 3.0 closes much of the remaining capability gap with .NET Framework 4.8, enabling Windows Forms, WPF and Entity Framework 6. .NET 5 builds on this work, taking .NET Core and the best of Mono to create a single platform that you can use for all your modern .NET code.

We intend to release .NET 5 in November 2020, with the first preview available in the first half of 2020. It will be supported with future updates to Visual Studio 2019, Visual Studio for Mac and Visual Studio Code.

Check out .NET Core is the Future of .NET to understand how .NET 5 relates to .NET Framework.

.NET 5 = .NET Core vNext

.NET 5 is the next step forward with .NET Core. The project aims to improve .NET in a few key ways:

  • Produce a single .NET runtime and framework that can be used everywhere and that has uniform runtime behaviors and developer experiences.
  • Expand the capabilities of .NET by taking the best of .NET Core, .NET Framework, Xamarin and Mono.
  • Build that product out of a single code-base that developers (Microsoft and the community) can work on and expand together and that improves all scenarios.

This new project and direction are a game-changer for .NET. With .NET 5, your code and project files will look and feel the same no matter which type of app you’re building. You’ll have access to the same runtime, API and language capabilities with each app. This includes new performance improvements that get committed to corefx, practically daily.

Everything you love about .NET Core will continue to exist:

  • Open source and community-oriented on GitHub.
  • Cross-platform implementation.
  • Support for leveraging platform-specific capabilities, such as Windows Forms and WPF on Windows and the native bindings to each native platform from Xamarin.
  • High performance.
  • Side-by-side installation.
  • Small project files (SDK-style).
  • Capable command-line interface (CLI).
  • Visual Studio, Visual Studio for Mac, and Visual Studio Code integration.

Here’s what will be new:

  • You will have more choice on runtime experiences (more on that below).
  • Java interoperability will be available on all platforms.
  • Objective-C and Swift interoperability will be supported on multiple operating systems.
  • CoreFX will be extended to support static compilation of .NET (ahead-of-time – AOT), smaller footprints and support for more operating systems.

We will ship .NET Core 3.0 this September, .NET 5 in November 2020, and then we intend to ship a major version of .NET once a year, every November:

We’re skipping the version 4 because it would confuse users that are familiar with the .NET Framework, which has been using the 4.x series for a long time. Additionally, we wanted to clearly communicate that .NET 5 is the future for the .NET platform.

We are also taking the opportunity to simplify naming. We thought that if there is only one .NET going forward, we don’t need a clarifying term like “Core”. The shorter name is a simplification and also communicates that .NET 5 has uniform capabilities and behaviors. Feel free to continue to use the “.NET Core” name if you prefer it.

Runtime experiences

Mono is the original cross-platform implementation of .NET. It started out as an open-source alternative to .NET Framework and transitioned to targeting mobile devices as iOS and Android devices became popular. Mono is the runtime used as part of Xamarin.

CoreCLR is the runtime used as part of .NET Core. It has been primarily targeted at supporting cloud applications, including the largest services at Microsoft, and now is also being used for Windows desktop, IoT and machine learning applications.

Taken together, the .NET Core and Mono runtimes have a lot of similarities (they are both .NET runtimes after all) but also valuable unique capabilities. It makes sense to make it possible to pick the runtime experience you want. We’re in the process of making CoreCLR and Mono drop-in replacements for one another. We will make it as simple as a build switch to choose between the different runtime options.

The following sections describe the primary pivots we are planning for .NET 5. They provide a clear view on how we plan to evolve the two runtimes individually, and also together.

High throughput and high productivity

From the very beginning, .NET has relied on a just-in-time compiler (JIT) to translate Intermediate Language (IL) code to optimized machine code. Since that time, we’ve built an industry-leading JIT-based managed runtime that is capable of very high throughput and also enabled developer experiences that make programming fast and easy.

JITs are well suited for long-running cloud and client scenarios. They are able to generate code that targets a specific machine configuration, including specific CPU instructions. A JIT can also re-generate methods at runtime, a technique used to JIT quickly while still having the option to produce a highly-tuned version of the code if this becomes a frequently used method.

Our efforts to make ASP.NET Core run faster on the TechEmpower benchmarks is a good example of the power of JIT and our investments in CoreCLR. Our efforts to harden .NET Core for containers also demonstrates the runtime’s ability to dynamically adapt to constrained environments.

Developer tools are another good example where JIT shines, such as with the dotnet watch tool or edit and continue. Tools often require compiling and loading code multiple times in a single process without restarting and need to do it very quickly.

Developers using .NET Core or .NET Framework have primarily relied on JIT. As a result, this experience should seem familiar.

The default experience for most .NET 5 workloads will be using the JIT-based CoreCLR runtime. The two notable exceptions are iOS and client-side Blazor (web assembly) since both require ahead-of-time (AOT) native compilation.

Fast startup, low footprint, and lower memory usage

The Mono Project has spent much of its effort focused on mobile and gaming consoles. A key capability and outcome of that project is an AOT compiler for .NET, based on the industry-leading LLVM compiler project. The Mono AOT compiler enables .NET code to be built into a single native code executable that can run on a machine, much like C++ code. AOT-compiled apps can run efficiently in small places, and trades throughput for startup if needed.

The Blazor project is already using the Mono AOT. It will be one of the first projects to transition to .NET 5. We are using it as one of the scenarios to prove out this plan.

There are two types of AOT solutions:

  • solutions that require 100% AOT compilation.
  • solutions where most code is AOT-compiled but where a JIT or interpreter is available and used for code patterns that are not friendly to AOT (like generics).

The Mono AOT supports both cases. The first type of AOT is required by Apple for iOS and some game consoles, typically for security reasons. The second is the preferred choice since it offers the benefits of AOT without any of its drawbacks.

.NET Native is the AOT compiler we use for Windows UWP applications and is an example of the first type of AOT listed above. With that particular implementation, we limited the .NET APIs and capabilities that you can use. We learned from that experience that AOT solutions need to cover the full spectrum of .NET APIs and patterns.

AOT compilation will remain required for iOS, web assembly and some game consoles. We will make AOT compilation an option for applications that are more appliance-like, that require fast startup and/or low footprint.

Fundamentals and overlapping experiences

It is critical that we continue to move forward as an overall platform with startup, throughput, memory use, reliability, and diagnostics. At the same time, it also makes sense to focus our efforts. We’ll invest more in throughput and reliability in CoreCLR while we invest more in startup and size reduction with the Mono AOT compiler. We think that these are good pairings. Throughput and reliability go together as do startup and size reduction.

While there are some characteristics where it makes sense to make different investments, there are others that do not.

Diagnostics capabilities need to be the same across .NET 5, for both functional and performance diagnostics. It is also important to support the same chips and operating systems (with the exception of iOS and web assembly).

We will continue to optimize .NET 5 for each workload and scenario, for whatever makes sense. There will be even greater emphasis on optimizations, particular where multiple workloads have overlapping needs.

All .NET 5 applications will use the CoreFX framework. We will ensure that CoreFX works well in the places it is not used today, which is primarily the Xamarin and client-side Blazor workloads. All .NET 5 applications will be buildable with the .NET CLI, ensuring that you have common command-line tooling across projects.

C# will move forward in lock-step with .NET 5. Developers writing .NET 5 apps will have access to the latest C# version and features.

The birth of the project

We met as a technical team in December 2018 in Boston to kick off this project. Design leaders from .NET teams (Mono/Xamarin and .NET Core) and also from Unity presented on various technical capabilities and architectural direction.

We are now moving forward on this project as a single team with one set of deliverables. Since December, we have made a lot of progress on a few projects:

  • Defined a minimal layer that defines the runtime <-> managed code layer, with the goal making >99% of CoreFX common code.
  • MonoVM can now use CoreFX and its class libraries.
  • Run all CoreFX tests on MonoVM using the CoreFX implementation.
  • Run ASP.NET Core 3.0 apps with MonoVM.
  • Run MonoDevelop and then Visual Studio for Mac on CoreCLR.

Moving to a single .NET implementation raises important questions. What will the target framework be? Will NuGet package compatibility rules be the same? Which workloads should be supported out-of-the-box by the .NET 5 SDK? How does writing code for a specific architecture work? Do we still need .NET Standard? We are working through these issues now and will soon be sharing design docs for you to read and give feedback on.

Closing

The .NET 5 project is an important and exciting new direction for .NET. You will see .NET become simpler but also have broader and more expansive capability and utility. All new development and feature capabilities will be part of .NET 5, including new C# versions.

We see a bright future ahead in which you can use the same .NET APIs and languages to target a broad range of application types, operating systems, and chip architectures. It will be easy to make changes to your build configuration to build your applications differently, in Visual Studio, Visual Studio for Mac, Visual Studio Code, Azure DevOps or at the command line.

See: .NET 5 on Hacker News

281 comments

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

  • Mazhar Khan 0

    LOL

  • Alex Sarafian 0

    Hi,
    It is good that .net is converging again to one sdk but regardless of the names the reality is that some features are not cross platform, one of them being the system.servicemodel assembly that powers WCF. This was never ported to the core which effectively makes soap unavailable in .net core and powershell core as well. It seems as Microsoft has removed WCF and SOAP from any future plans.
    Please share if possible, the team’s plans about this topic because it is never mentioned and many established technologies and API are still driven by SOAP and some products use advanced versions of the technology.

    I would like to know if the set of apis will be  cross platform and available in powershell core which depends on .net core

    Thank you.

  • Marc Moreau 0

    ASP Web Forms and ASP MVC are two ways of implementing the same thing. So if there is only one way left, that’s Ok. But concerning desktop applications, why not merge WPF and Xamarin together in .NET Core 3 and make developpers be abble to work with portable XAML UIs ?
    Today when you want to make desktop UIs, you have 4 ways to do it : winforms, WPF, UWP and Xamarin. It shoud be better to optimize Microsoft Desktop Application Development into 1 or 2 ways which should be portable on all devices : Android, Apple, Linux as well as Windows.
    .NET Core should make .NET less dependant from Windows, so that if Windows dies, .NET Framework and C# would have a chance to survive.
    In another hand, WCF was a smart way to implement Web Services and Interop between Java and .NET. Keep that interop simple please !

    • Pierce BogganMicrosoft employee 0

      Hi Marc, I work as a PM on the Visual Studio and .NET teams. I’d be interested in learning more about your specific development scenarios and needs for a cross-platform UI. Mind sending me an email at piboggan@microsoft.com to set some time up for discussion?

  • Robert Boissy 0

    MSFT lost valuable time, mind share, and market share by failing to grasp the significance of open-source software early enough. There is another open-source revolution taking place thanks to the maturation of the open-source RISC-V (pronounced “RISC-Five”) ISA. MSFT should join the RISC-V Foundation, provide funding to MSR and external academics in this area, and gain expertise and contribute to this second open-source revolution. The RISC-V ISA is especially important to the IoT (extremely low-power sensors) and secure computing (e.g., see “Morpheus: A Vulnerability-Tolerant Secure Architecture Based on Ensembles of Moving Target Defenses with Churn” on the ACM Digital Library). The RISC-V ISA is also of great importance to DARPA and the rest of the DoD, so MSFT’s involvement in this space is relevant to the JEDI contract. Amazon’s FreeRTOS already supports RISC-V, and Amazon is a significant MSFT competitor-frenemy (and JEDI contract finalist). A roadmap for Linux RISC-V support by .NET would be most welcome.

  • Michael Taylor 0

    So basically this is .NET Framework 2020. Everybody saw this coming years ago with .NET Core. All you have really done is replatformed NF to a newer CLR and dropped some tech you don’t want to support. In 2021 we’ll be running into the same issues that NF has today, just on a newer platform. Changes made to .NET will have to be thoroughly tested across multiple platforms, the fast iteration times that Core was bragging about will be gone because now everybody has to update their platforms together. My app will have to target .NET vX but won’t run on all platforms until that platform updates their CLR.
    .NET Standard, which was supposed to normalize access, hasn’t done anything and updating Standard to support all the new stuff will be too much work. So basically .NET is doing what Java did years ago which was virtualize the hardware and require every platform to support it. Just go ahead and tell everybody what we already know – Standard didn’t accomplish what we had hoped, it is being phased out. All apps will target Core and “just work”.
    We’re back in the same boat with Core that we have now. Nothing has really changed. In 2040 we’ll probably be having this same discussion again. Core was nothing but a glorified rewrite of the CLR.

    • Tsahi Asher 0

      You are missing the whole point of .NET Core. You can install a .NET Core application on a machine that doesn’t have .NET Core installed at all, and just bring the framework with you, as .dll files. Multiple versions of .NET Core can also be installed side by side.

      • Pete Wilson 0

        And when .Net Framework was first announced, it provided the solution to “DLL Hell” by supposedly allowing side by side installs of multiple versions ensuring apps would just work. What has changed with .Net Core to make that just work better?

  • Yordan . 0

    I so hope for Microsoft to abandone Windows 10 UI for the good of all human kind..

    • SuperCocoLoco . 0

      +1 Me too.

  • Patrick Smacchia 0

    Will the .NET 4.x third-party libraries that rely on WPF and/or Winforms will be runnable as-is on .NET 5? I haven’t found an answer to this question but this is a key one I guess for everybody that plans a migration. If the answer is yes, if the CLR v5 will be smart enough to run such .NET 4.x bits, this will relieve a lot of headache. Because migrating custom WPF/Winforms code to .NET 5 will be easy, but the real problem will come from migrating third-party libraries we don’t have source for.

  • Ryan TremblayMicrosoft employee 0

    Great news and great article! Some follow up questions:
    1. It sounds like the plan is to have a single AOT solution, probably mostly based on Mono AOT, in which case CoreRT and .NET Native will be deprecated (or folded into the single AOT solution). Is that right?
    2. Is it a goal to get Unity to eventually deprecate IL2CPP and replace it with the supported .NET AOT solution?
    3. I think the article is indicating that Xamarin’s platform native bindings will work in both .NET runtimes. Is that right? If so, is it a goal to ensure Xamarin platform native bindings are usable in Unity based apps (and the Unity editor itself)?

  • Courtney The coder . 0

    Will it support console like mono and no i dont mean via unity i mean being able to write raw c# hit compile and test it with what ever C++ cross compatiable libarys im useing like SD2. or will this still be playing catch up to mono.Java interop has always been avable using the Java C++ bridge. i feel this is encouraging lazy programming instead of actual improvements.No mention of extension method improvements. such as extension propertys or static class extensions. would be nice to havepublic extension property string WidthCM(this Texture tex){get; set;}Seems ill have to wait for improvements that actually matter for another year.

  • Gregg Swanson 0

    Do you plan to support .net remoting?

Feedback usabilla icon