Getting Started With .NET 5.0

Introduction

 
In this article, I am going to explain what’s new in .NET 5.0, what .NET Core is, .Net Core features and benefits, .Net Core Versions, why we use .Net Core, and how to install and set up Visual Studio for developing .NET 5.0 Console applications. Latest version of .Net Core is .NET 5.0 and it was released on November 10, 2020.
 

What’s New in .NET 5.0?

 
Microsoft released .NET 5.0 on November 10, 2020. Visual Studio 2019 updated version 16.8 is required for developing .Net 5.0 console applications.
 
There is no .NET Core 5.0, everything now comes under one umbrella, which is .NET 5 (A Major Release of Microsoft). The idea is to bring all .NET runtimes into a single .NET platform with unified base class libraries (BCL) for all kinds of applications like ASP.NET Core, Windows Forms, WPF, Blazor, Xamarin etc.
 
.NET 5.0 is now the only platform. .NET 5.0 combines features of both .NET Core 3.1 and .NET Framework 4.8x.
 
If you are working with ASP.NET Core 3.1 and planning to upgrade ASP.NET Core 3.1 to .NET 5.0, then it’s very easy to upgrade to ASP.NET Core 3.1 to ASP.NET Core 5.0.
 

.NET Schedule

 
Getting Started With .NET 5.0 
 

Features

  • C# updates
  • F# updates
  • Visual Basic updates
  • Text.Json new features
  • Single file apps
  • App trimming
  • Windows ARM64 and ARM64 intrinsics
  • Tooling support for dump debugging
  • The runtime libraries are 80% annotated for nullable reference types
  • Performance improvements,

    • Garbage Collection (GC)
    • Text.Json
    • Text.RegularExpressions
    • Async ValueTask pooling
    • Container size optimizations
    • Many more areas
To get more details about .NET 5.0 Click here.
 

What is .NET Core?

 
.NET Core is a new version of .Net framework, developed by Microsoft. It is an open-source framework for developing windows, web applications, services and mobile applications and it can be run on Windows, Mac, or Linux. .Net Core applications can run on both .NET CORE and traditional .NET Frameworks (.NET framework 4.x). It has been completely rewritten from scratch. It was initially launched as .Net 5 but then it was renamed to .NET CORE 1.0.
 
In simple words, .Net Core is a cross platform, high-performance, unified, fast, lightweight, open-source framework for building mobile, and web windows applications and services.
 

.NET Core Versions

 
Getting Started With .NET 5.0
 

History of .NET Core Versions

 
The below table shows the details of .Net Core Versions.
 
Version
Release Date
Development/Editor Tool
Support
.Net Core 1.0
Jun-27-2016
Visual Studio 2015 updated version 3
1.0
.Net Core 1.1
Nov-18-2016
Visual Studio 2015,2017
1.0,1.1
.Net Core 2.0
Aug-14-2017
Visual Studio 2017 Version 15.3
1.0,1.1,2.0
.Net Core 2.1 Long Term Support
May-30-2018
Visual Studio 2017 Version 15.7
1.0,1.1,2.0,2.1
.Net Core 2.2
Dec-04-2018
Visual Studio 2017 Version15.9
1.0,1.1,2.0,2.1,2.2
.Net Core 3.0
Sep-23-2019
Visual Studio 2019
Version 16.3
1.0,1.1,2.0,2.1,2.2,3.0
.Net Core 3.1 (3 yr Long-term support)
Dec-03-2019
Visual Studio 2019
Version 16.4
1.0,1.1,2.0,2.1,2.2,3.0,
3.1
.NET 5.0
Nov-10-2020
Visual Studio 2019
Version 16.8
1.0,1.1,2.0,2.1,2.2,3.0,
3.1,5.0
.NET 6.0
2021-11(projected)
   
.NET 7.0
2022-11(projected)
   
.NET 8.0
2023-11(projected)
   
 
Note
Asp.Net Core and .Net Core are different, just like Asp.Net and .Net Framework.
 

Why Use .Net Core?

  • Cross platform: It can run on windows, Linux and Mac.
  • Unified: It offers a single unified component like .NET Standard library for all platforms with the same code, same languages and same tools.
  • Better performance: .Net core does not depend on system.web.dll for communication between browser-server. In .Net core everything is packages which we need for our application. Packages reduce the request pipe line and improve the application performance.
  • Lightweight: It is a lightweight framework. It allows developers to deploy libraries and components that are needed in a set of packages.
  • Dependency Injection: Dependency Injection is in-built in .Net Core.
  • Hosting: .Net Core application can be hosted on multiple Web server such as IIS, Apache, Docker etc. It is not dependent on IIS.
  • Open Source: It is a fully open source framework. That means, it is free of cost and its source code is available.
  • Testability: Unit testing is very easy in .Net core applications.
  • Side-by-side App Versioning-.Net Core runs on .NET Core, which supports simultaneously running in multiple versions of applications.

Setting Up Machines for .NET 5.0 Development

 
We need to install 2 softwares for developing .Net 5.0 applications.
  • An Editor/ Integrated Development Environment (IDE)
  • .NET 5.0 SDK or Later(Software Development Kit)
Step 1 - Download and Install an editor for .NET 5.0 Development
 
I am using Visual Studio 2019 updated version 16.8 or later as the editor for .NET 5.0 application development. You can use any editor of your choice. 
  • Visual Studio
  • Visual Studio Code
  • Sublime
  • Vim
  • Atom
  • Etc.
Download and install Visual Studio
  • I am using Visual Studio 2019 16.8, so I need to install Visual Studio 2019 16.8 Community Edition because this is free.
  • You can download Visual Studio 2019 16.8 from this Link.

    Getting Started With .NET 5.0

  • To develop .NET 5.0 applications in Visual Studio 2019 16.8, please select .NET Core cross-platform development workload when installing.

    Getting Started With .NET 5.0
Step 2 - Download and install .NET 5.0 SDK or Later 
 
You can download .NET 5.0 SDK or later from this link.
 
Getting Started With .NET 5.0
 
Depending on the operating system you have, download and install the SDK.
  • The SDK includes everything you need to build and run .NET core applications.
  • The .NET Runtime is already included in the SDK. So, there is no need to install .NET Runtime.
  • The .NET Core Runtime is already included in the SDK. So, there is no need to install .NET Core Runtime
  • The .NET Core Runtime includes just the resources required to run existing .NET Core applications.

Conclusion

 
In this article we explained the basics of .NET 5.0 and how to set up machine for developing the .NET 5.0 Console applications.


Similar Articles