Friday, May 10, 2019

.NET Core and .NET merging as .NET 5.0

Some good news for .NET developers: .NET Core and .NET merging as .NET 5.0 very soon!

In a surprising (and much welcomed) move, Microsoft announced that .NET and .NET Core 3.0 will be merged into .NET 5.0. As a big fan of the KISS principle and lean frameworks and architectures, This decision will benefit not only both .NET communities but also the whlo .NET ecosystem.

Here's an extract from what Microsoft said:
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.

Why it Matters?

  • first because .NET has a huge market share and is being run on billions of devices. However, .NET only runs natively Windows platforms. Merging it with .NET Core would mean that the framework would access other architectures including being able to run docker natively.
  • second because .NET Core is more performant. That would bring significant optimizations to the whole ecosystem, including Entity Framework and Docker.
  • third because .NET Core incorporates much of the modern development toolset including ability to run containers, deploy to the cloud and a very robust cli.
  • and finally because the .NET Core development experience is way better and less decoupled from tools like Visual Studio (thanks in part to the .NET Standard). In other words,  developers love .NET Core.

I also welcome the simplification of the name. All the namespaces for .NET Core were becoming unnecessary bloated what will probably be simplified onward.

The Schedule

The proposed merge is expected to happen by November 2020. Here's the plan:

Mono and .NET Core

Since the .NET Core and Mono runtimes have a lot of similarities, CoreCLR and Mono will be drop-in replacements for one another. Developers will be able to switch to choose between the different runtime options.

Microsoft is also committed on investing on throughput and reliability in CoreCLR and invest more in startup and size reduction with the Mono AOT compiler.

In theory, all .NET 5 applications will use the CoreFX framework, CoreFX will work in places not used today. .NET 5 applications will be buildable with the .NET CLI, ensuring that you have common command-line tooling across projects.

Questions

Moving to a single .NET implementation raises important questions, including:
  • 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 will work?
  • Will we still need the .NET Standard?

All questions are expected to be answered in the near future.

Final Thoughts

Apart from the above questions, this is very exciting for .NET developers. Having worked with .NET since 1.1 and being a .NET Core early adopter mainly focusing on Linux development, I never liked the idea of two very similar but distinct frameworks. It just seemed like an unnecessary complication. With a much better performance, cli and more extensive target installation base, integrating .NET Core enhancements into .NET will be much appreciated by the whole community.

That announcement ends that duality and brings all .NET developers on board of the same boat again.

See Also

Introducing .Net 5
.NET 5 on Hacker News 
Stack Overflow Survey 2019
Building and Running Asp.Net Core apps on Linux
Package Management in .Net Core
Importing CSVs with .Net Core and C#
Exporting a CSV generated in-memory in Asp.Net with C#
Asp.Net / Asp.Net Core: Generating views in the backend
.NET Core Command-Line Interface (CLI) Tools
Mono Project

For more posts on .Net Core, please click here.