Developers had to learn about .NET Standard, but years later .NET Standard still confused those who didn’t understand how to use it—they mistook it for a runtime when it was truly just a specification. As a target framework moniker (TFM), developers could author class libraries that targeted .NET Standard and made the package consumable by applications aimed at either .NET Core or .NET Framework. Think multi-targeting. While using compiler directives, package authors could write conditional code that would compile for .NET Core or .NET Framework. This standardization allows numerous implementations to meet the standard. With .NET Standard, versions align with .NET Core and .NET Framework implementations.
“.NET Standard is a specification. It represents a set of APIs that all .NET platforms have to implement.” －Immo Landwerth
Imagine the maintenance of this code; how does that make you feel—an interesting concept, but not without a bit of angst.
Unifying .NET Core and .NET Framework
Landwerth did a great job and the videos were extremely helpful, but now Microsoft is again pivoting. At the Microsoft Build 2019 conference, they are unifying .NET Core and .NET Framework with their announcement of .NET 5.
“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, WebAssembly, and more.” — Richard Lander
Yes, you read that correctly, but it bears repeating. .NET 5 aims to unify .NET Framework and .NET Core. There is still a lot of work to make this announcement a reality. It simply will not happen in 2019, so look for it in 2020. This should help the developer community tremendously as it simplifies things!
Microsoft is also leveraging the work from the Mono runtime and .NET Core. It might seem scary at first (again, as developers we need to embrace change not fear it), but rest assured knowing all of the work leading up to .NET 5 is built on the successes of .NET Core and Mono. The unification of .NET brings about a true sense of closure around the divided .NET ecosystem that plagued the developer community for the past several years. At this point in time, it’s unclear whether .NET Standard will even exist moving forward.
While it’s easy to get caught up in the past, and grumble over previous concerns and frustrations, we must move forward. Perhaps, arguably one of the most logical paths forward is to unify .NET Core and .NET Framework … dare I say, “Let’s make .NET great again!” Maybe, I’ve gone too far, but let’s discuss the future. Where is Microsoft steering us?
Let’s take a step back for a moment and discuss where we’ve come from, before diving into where we’re going. Not all .NET developers are aware of how their code compiles, and what is truly produces.
“From the very beginning, .NET has relied on a just-in-time (JIT) compiler to translate Intermediate Language (IL) code to optimized machine code.” — Richard Lander
Revisiting my earlier mention of the Mono project, we know there have been significant efforts around making an ahead-of-time (AOT) compilation for .NET. Mono has achieved with its industry-leading LLVM compiler infrastructure.
“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.” — Richard Lander
It is important to realize that no more .NET Framework features will be ported over after .NET 3.0. Again, the schedule to introduce .NET 5 is November 2020, so the timing is an important factor. While it seems like a long time from now, it will come quickly. You might be asking yourself, “What should we do in the meantime?” We’ll discuss that next.