Getting started on .NET 5: the latest .NET Core Version

Getting started on .NET 5: the latest .NET Core Version

Let’s have a quick walkthrough of .NET Framework releases, .NET Core, .NET Standard and .NET 5.

.NET Framework

Back in late 90s, Microsoft released the initial versions of .NET Framework. Microsoft and Intel worked on standardizing Common Language Infrastructure and C#.

Later, the .NET Framework version v2 (in 2005), v3.5 (in 2007), v4 (2010)and v4.5 (2012) were released later. The .NET Framework became super popular. Many enterprise applications are running on .NET Framework.

The .NET Framework supports creation of web applications (ASP .NET), web services (.asmx and WCF), Standalone desktop applications (Winforms and WPF). There were other cool sub-frameworks, LINQ, Entity Framework, REST APIs, MVC for Web Apps,

Microsoft also slowly made the source code of .NET Framework available for all.

But there was one practical limitation. The .NET Framework CLI was mainly available for Windows. So, the applications written in .NET could not be executed on Linux or MacOS.

.NET Core

In 2014, Microsoft released first version of .NET Core 1.0.

.NET Core is a free and open-sourcemanaged computer software framework for WindowsLinux, and macOS operating systems. In last few years, the .NET Core has been gaining a lot of attention. .NET Core is being considered as successor of .NET Framework.

So, what is future of .NET Framework ?

The .NET Standard versions were released a long with .NET Core. Technically, the .NET Standard is a formal specification of .NET APIs that are intended to be available on all .NET implementations.

As per comment in Microsoft documentation, .NET Framework will not support .NET Standard 2.1 or later versions.

This decision has been taken in order to not break .NET Framework as there are enormous number of applications running on .NET Framework and they will get affected if any of the basic APIs are changed to support .NET .

.NET 5

The .NET 5 is next release after .NET Core 3.1. So, technically it is not the .NET Framework.

The latest .NET Core release was 3.1 and .NET Framework latest release was 4.x . In order to avoid any confusion, next version of .NET Core skipped version 4 to avoid confusion with .NET Framework and so named as .NET 5. .NET Core is later named as .NET, the word “core” was dropped from branding perspective.

Below diagram shows the high level releases, they are not exactly ordered by dates, but I think it should give you high level idea about the .NET past releases and where .NET 5 lies.

.NET 5 is next version of .NET Core
.NET 5 is next version of .NET Core

Enable .NET 5 in Visual Studio

To get started with .NET 5 RC1 install the .NET 5 SDK. .NET RC1 also is included with Visual Studio 2019 16.8 Preview 3.

Visual Studio 2019: Enable .NET Core SDK Previews
Visual Studio 2019: Enable .NET Core SDK Previews

Once this checkbox is enabled, you will need to restart the Visual Studio.

Next, you can try creating a .NET Core web application and the Visual Studio will show you .NET 5 as an option as shown in below snapshot.

Visual Studio 2019: Option to target .NET 5
Visual Studio 2019: Option to target .NET 5

As you see, the target framework version dropdown shows ASP .NET Core 5. If you try to edit the CSPROJ file, it would show target framework to be .NET 5.

<Project Sdk="Microsoft.NET.Sdk.Web">
<PackageReference Include="Swashbuckle.AspNetCore" Version="5.5.1" />
view raw project.csproj hosted with ❤ by GitHub

I hope this article helps you. Let me know your thoughts.

Leave a Reply