TL;DR – Microsoft is pushing for the cloud. Their cloud. .NET Core 1.0 is a mean to lure all developers to Azure by abandoning the Windows dependency.
(image from Scott Hanselman’s blog here)
Lets travel exactly 14 years ago. The day is February 13th 2002, Microsoft releases a brand new framework. Introducing – the .NET Framework 1.0!
Naturally, as the years went by, the framework evolved and so did the versioning.
We all know the milestones like .NET 2.0 which gave us ‘Generics’ or 4.0 that brought us the ‘TPL’. Everything was pretty much in order, until recently.
Now, back to present time, it’s February 13th, 2016. The .NET framework is currently at version 4.6.1, but the future is somewhat confusing. Day in and day out we hear announcements from Microsoft and many (oh so many) buzzwords are starting to catch friction in the developer’s community around the world. Recently it got really hard to keep up! And the fact that Microsoft is renaming their products is not of any help, either.
How many times have you heard these terms in the past year: .NET 5, .NET vNext, .NET Core 5, .NET Core 1.0?
This whole .NET Core thing is confusing, and i’d like to put everything in order.
Naming and Versioning – ‘The Reboot’:
Let me get it out of the way right at the beginning – vNext is no longer relevant. It was sort of a code-name for the future version .NET and you might still see this term used in lots of official Microsoft resources. Every time you see ‘vNext’ just assume they are talking about .NET 5 / .Net Core 1.0.
In 2014, Microsoft announced the release of .NET Core 5 as if it is a successor to the 4.6.x versions. The number ‘5’ implied a superset of all the previous .NET versions, but the .NET Core 5 was a stripped and slim redesigned version of the big .NET Framework, that should also be open source and cross-platform. The number ‘5’ was not a natural choice to begin with, but it took some time for Microsoft to decide on the change, so now they are rebooting the versioning for .NET.
- The .NET Core 5 was renamed to .NET Core 1.0
- ASP.NET 5 became ASP.NET Core 1.0
Well, you get the pattern.
As for WebApi – it was integrated into the Core framework. From now on, there is no such thing as MVC 6 and WebApi 2 that are moving separately – it’s all ASP.NET MVC Core 1.0 from now on.
Also worth mentioning that EntityFramework 7 is now being renamed to EntityFramework Core 1.0 as well.
Inside the Core:
So what is .NET Core 1.0? Simply put, it is a fork on the full desktop .NET framework. It is a stripped down, cross-platform, server-only version of .NET that we all know and love.
Since it is cross-platform, it does not support client technologies like WPF or WinForms.
In fact, it does not support anything that requires the Windows runtime.
The full desktop framework is machine-wide while the Core framework is application wide. This will affect how you deploy your application and the framework itself. You won’t need to download a huge installer with .NET Core, like with the full .NET framework. It will not register its assemblies in the GAC and won’t create crucial registry changes to your system. With .NET Core you will be able to work in a pure sandboxed environment that will only reference the relevant packages and the relevant runtime for your application.
All this means easier deployment, easier updates, easier maintenance and containerization.
The 3 main components of the Core framework are:
- CoreFX – this is the open source, cross-platform BCL (base class library) of the .NET framework. Think of it like the basic System.* dependencies that you will get via Nuget.
- CoreCLR – this is the open source, cross-platform runtime for the Core framework. You can package a specific version of the CoreCLR with your application and deploy it in one piece.
- .NET Core CLI – this is the command line interface for cross-platform .NET that should simplify building and deploying cross-platform solutions.
There are other very interesting features like ‘Native Compilation’, but i will cover those in future posts.
Nuget plays a main role in the new Core framework too. You should no longer deal with raw assemblies, but rather fully rely on Nuget packaging.
Thanks to Nuget, the Core framework is very modular to the level of you being able to run multiple applications on a single machine when each application has it’s own CoreCLR version and it’s own CoreFX packages dependencies. (i bet you are thinking containers right now).
So what happened to Microsoft? They are making a good buck from their Windows licenses and now they are going cross-platform? What will happen to Windows? Aren’t they dreading a massive exodus to other platforms?
Well, here is an interesting bit for you, Microsoft signed a deal with Red Hat (a company developing enterprise Linux) to have native support for Linux in Azure. Yes, the same Linux OS that Steve Ballmer once called ‘cancer’.
With .NET Core 1.0 it doesn’t really matter weather you love Windows or not, because now you don’t have to. Just choose the OS that you like and deploy your project to Azure cloud.
Windows dependency is no more for .NET Core, form now on you will be able to develop solutions on any platform and completely sandboxed. No more machine-wide installations of the framework, no more local OS dependency. From now on all you need to run you .NET Core application is self hosted, including the runtime and the libraries.
Microsoft wants everyone on their cloud, on Azure. It doesn’t matter if you are coming from Linux, iOS or Windows – just pick up a version of .NET Core and run it on whatever operating system you wish, as long as it is on Microsoft Azure.