Introducing .NET 5
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.
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.
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.
What about IL Linker in context of .NET 5? It looks to me that this is little abandoned or I’m wrong?
It is not going to be abandoned, quite the opposite. Mono on .NET Core is already linker friendly.
Ok but what are the plans for .NET Core / .NET 5 (not mono). Is there any schedule?
Right. We are shipping the linker with .NET Core Preview 6 or 7.
Cool! Tnx for info.
Will VB.NET be supported in .NET5? (not clear from this post and the support for it in .NET Core is not complete)
The VB runtime (Microsoft.VisualBasic.dll) will be expanded in Preview 5 (out yesterday) and further expanded in Preview 6. We’re looking at feedback on some parts. For example, audio has low usage and we’ve had feedback that it isn’t a great way to do audio now, so we don’t plan to port that part of the VB runtime.
VB will move forward with .NET Core.
I’m glad to hear that VB support is continuing. We’ve stayed clear of .Net Core because of the lack of VB support.
The question was clearly not about the VB runtime.
There is a huge community of VB.NET language developers who want to use the CRL to develop their applications.
Xamarin does not allow direct VB.NET coding for everything, nor does Core, AFAIK – when will Microsoft enable this huge community to make their next gen dev platform a huge success, instead of just the moderate success it has been so far.
Some of the issues I run into is with FLOW and interoperability. Additionally, BCS issues are causing huge problems because of connectivity problems. We are moving negatively toward and SAP type of environment. .Net is a great framework and very usable. I keep seeing the modern interface and how easy it is to use, but custom views are still being required. Look and feel and functionality are seriously important. Trying to give users the capability of doing it themselves doesn’t work as well as allowing the customization needed to be effective. I do agree that .net will not disappear in my lifetime.
VB must be fully supported on .net core and .net 5.
Any changes in MacOS mandatory usage to build Xamarin iOS?
I believe this is an Apple requirement.
But what Microsoft can do and haven’t done yet is allow building for Android from Linux. Currently you are required to use Windows and Mac to develop mobile apps with C#, which sucks for Linux users.
Really glad to hear you guys are finally going to clean up the naming/versioning mess that has existed since .NET Core was created.
It’s really odd how Microsoft couldn’t admit for so many years that this was the inevitable result of .NET Core development- deprecation of .NET Framework and Mono’s libraries- when everyone on the outside saw it clear as day.
Is this the end of .NET Standard? Now that there will only be a single .NET library?
We didn’t “admit” anything around this earlier because we didn’t have a good plan that we thought we could land in a reasonable period of time. We now have that plan.
You say that Rich, but every MS employee I’ve spoken to at conferences for the past 5 years has privately admitted that this was the inevitable conclusion. Only officially has there been this ever evolving, highly implausible story of “.NET Framework, Mono, Unity will continue to be developed side-by-side with .NET Standard tying them together”.
Is .Net standard finished then at version 2.1 with version 2.0 the last version to support .Net Framework.
The current recommendation has been to convert libraries to .Net standard with the broardest support for your target platforms. Is this advice changing here?
i assume if you are converting a library that needs to ruin on framwork, still convert to .Net standard. If not, and Windows UI could be on .Net Core WPF/Win Forms/UWP/Console, don’t do .Net standard and just do .Net Core 3.0 and then .Net 5.0 in future?
Our advice remains the same: use .NET Standard for breadth support. I suspect that will remain the case for quite some time.
I think you have the right idea. In 2021 you could create .Net Core libraries which can be widely used. But there is no serious cost to targeting .Net Standard 2.x instead of .Net Core. In 2022 they may have stopped releasing new .Net Standard versions since it only applies to .Net Core by then. So you can make a 1-line change in your project files to target Core instead of Standard to get the latest APIs.
Official cross-platform GUI library when?
No plans around that. Would definitely be cool, but we are not building that currently.
Sorry to hear that there’s any plan on that. Why not use SkiaSharp or similars to build next big ui framework that’s a direct concurrent of Flutter that target really cross platforms (ios, android, windows, mac, linux and fushia) ?
If you do make this, it would be awesome if it integrated with the GUI toolkits on the target OS. Xamarin apps look native on Android and iPhone, and it would be awesome for the same to apply for Windows, Mac, and Linux (GTK/Qt/either?).
Who needs that today anymore …
Angular is the new UI that meanwhile can do anything and ASP.NET as Backend with GraphQL or REST
… and is completely incompatible with .NET, leading to increased costs in development and maintenance as you are now effectively managing two codebases written in two different languages, rather than one. Those who understand these business implications need a cross-platform library implementation, is who. Those who like compounding prohibitive costs into their software development processes can continue to use Angular alongside .NET, is who.
Hi Mario, 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 firstname.lastname@example.org to set some time up for discussion?
Will the ahead-of-time native compiler also works for WPF / Winforms .NET 5 projects (pretty please let this happen!!) or will this work for console applications only?
Regardless of it, thanks .NET team for the wonderful news! This goes straight in the right direction, amazing.
Yes, it will. At least for WinForms it’s almost in working condition now.
I’ve got tears in my eyes. This was the only feature I’ve really really missed in .NET, which made me jealous for other languages like C++ and I never believed it would become part of .NET because it’s a real breaking change. And today I read that it will come and even in 2020 already.
You’re amazing, thank you so much!
How does WinForms in .NET Core work when .NET Core is supposed to be cross-platform? Doesn’t that just lock those apps to Windows? Why not create a new cross-platform GUI system?
> How does WinForms in .NET Core work when .NET Core is supposed to be cross-platform?
You can see WinForms as a Windows-only library that’s built on top of .Net Core. You can create OS-specific .Net Core libraries today, and so can Microsoft.
> Doesn’t that just lock those apps to Windows?
> Why not create a new cross-platform GUI system?
Because that would be a lot of work and it’s not clear how something like that should be designed or how it would be profitable for Microsoft.
I am still hoping MS will do it anyway, at some point after .Net 5.
My understanding is that under Mono you can run WinForms applications crossplatform (Linux, MacOS). Would .NET5 not support the same functionality?
just this paragraph brought tears of joy into my eyes!!! Finally! (now let’s hope we see windows desktop apps becoming truly cross platform)
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.
Hi, 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 email@example.com to set some time up for discussion?
This is a brilliant and bold move. Explained very well and clears the air very much. Good job team.
Super exciting news!I can’t say how much I appreciate this very clear and fantastic strategy. Thank you! I noticed 2 things:a) “the next release after .NET Core 3.0 will be .NET 5″, but the .NET Schedule mentions a 3.1 LTS. Maybe adding a “major” to “the next release” in the blog post is a good fix for this, I don’t know :)b) Did you discuss already what we call for example ASP.NET Core when .NET 5 is out? Will it still be “ASP.NET Core”, or will it become just “ASP.NET” again?Thank you for all your hard work, Kudos to the whole .NET Team..NET 5 is the direction I wanted to see, and it fills me with great joy to learn how this amazing platform I love to use will evolve in the upcoming years.