Introduction
In this article, I am going to explain ASP.NET Core, ASP.NET Core's features and benefits, ASP.NET Core Versions, why to use ASP.NET Core, and how to set Visual Studio for developing ASP.NET Core 2.1 web applications. The latest version of ASP.NET Core is ASP.NET Core 3.1. It was released on December 3rd, 2019.
What is ASP.NET Core?
ASP.NET Core is a new version of ASP.NET, developed by Microsoft. It is an open-source framework for developing web application and can be run on Windows, Mac, or Linux. ASP.NET Core application can run on both .NET CORE and traditional .NET Framework (.NET framework 4.x). It is completely rewritten from scratch and it was initially launched as Asp.Net 5, but then was renamed to ASP.NET CORE 1.0.
Asp.Net Core is a cross-platform, high-performance, open-source framework for building modern, cloud-based, internet-connected applications.
ASP.NET Core Versions
What’s New in ASP.NET Core 3.1?
ASP.NET Core 3.1 version was released on December 3rd, 2019. The most important feature is that ASP.NET core 3.1 is a long-term supported (LTS) release and will be supported for 3 years. The Visual Studio 2019 updated version 16.4 is required to develop ASP.NET Core 3.1 web applications.
Features
- It supports Partial class for Razor components
- It passes parameters to top-level components
- It supports New component tag helper
- The garbage collector uses less memory by default
- It prevents default actions for events in Blazor application
- It stops event propagation in Blazor application
- Detailed errors during Blazor application development
- It Support for shared queues in HttpSysServer
- Breaks changes for SameSite cookies
Platform Support
ASP.NET Core 3.1 is supported on the following operating systems,
- Alpine: 3.10+
- Debian: 9+
- Ubuntu: 16.04+
- Fedora: 29+
- RHEL: 6+
- openSUSE: 15+
- SUSE Enterprise Linux (SLES): 12 SP2+
- macOS: 10.13+
- Windows Client: 7, 8.1, 10 (1607+)
- Windows Server: 2012 R2+
Prerequisites
- Install Visual Studio 2019 updated version 16.4
- Install .NET Core SDK 3.1
- SQL Server 2017
History of ASP.NET Core Versions
The below table shows the details of ASP.NET Core Versions.
Version
|
Release Date
|
Development/Editor Tool
|
Support
|
Asp.Net Core 1.0
|
Jun-27-2016
|
Visual Studio 2015 updated version 3
|
1.0
|
Asp.Net Core 1.1
|
Nov-18-2016
|
Visual Studio 2015,2017
|
1.0,1.1
|
Asp.Net Core 2.0
|
Aug-14-2017
|
Visual Studio 2017 Version 15.3
|
1.0,1.1,2.0
|
Asp.Net Core 2.1 (Long Term Support)
|
May-30-2018
|
Visual Studio 2017 Version 15.7
|
1.0,1.1,2.0,2.1
|
Asp.Net Core 2.2
|
Dec-04-2018
|
Visual Studio 2017 Version15.9
|
1.0,1.1,2.0,2.1,2.2
|
Asp.Net Core 3.0 Preview 9
|
Sep-04-2019
|
Visual Studio 2019 Version 16.3
|
1.0,1.1,2.0,2.1,2.2,3.0
|
Asp.Net Core 3.1 (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
|
Note
ASP.NET Core and .NET Core are both different, just like ASP.NET and .NET Framework.
Why use ASP.NET Core?
- Cross-platform- It can run on Windows, Linux, and Mac.
- Better performance- .NET core does not depend on system.web.dll for communication between Browser-server. In Asp.net core everything is packages which we need for our application. Packages reduce the request pipeline and improve application performance.
- Dependency Injection- Dependency Injection is in-built in Asp.Net Core.
- Integration with modern UI frameworks- It supports modern UI like Angular, ReactJS and Bootstrap, etc.
- Hosting-Net Core application can be hosted on multiple web servers such as IIS, Apache, Docker, etc. It is not dependent on IIS.
- Open Source- It is fully open source framework.
- Testability- Unit testing is very easy in Asp.Net core application.
- Side-by-side App Versioning-Net Core runs on .NET Core, which supports simultaneously running in multiple versions of applications.
- Unified Programming Model for MVC and Web API-In Asp.Net Core both MVC Controller and API Controller are Inherits from the same controller base class.
Setting up a machine for ASP.NET Core 2.1 development
We need to install two software packages for developing an ASP.NET Core 2.1 application.
- Editor/ Integrated Development Environment (IDE)
- .NET Core 2.1 SDK (Software Development Kit)
Step 1 - Download and Install an editor for ASP.NET Core 2.1 Development
I am using Visual Studio 2017 updated version 15.3.9 as the editor for ASP.NET Core 2.1 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 2017, so I need to install Visual Studio 2017 Community Edition because this is free.
- You can download Visual Studio 2017 from this link
- To develop ASP.NET Core 2.1 applications in Visual Studio 2017, please select .NET Core cross-platform development workload when install.
Step 2 - Download and install .NET Core 2.1 SDK
You can download .NET Core 2.1 SDK from this
link.
- Depending on your operating system you have, download and install the SDK.
- The SDK includes everything you need to build and run .NET Core applications.
- 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.
After installing .NET Core SDK 2.1, create a new ASP.NET Core 2.1 Application. You can see that the Core Dropdown list ASP.NET Core 2.1 shows up, so our software installation completed successfully.
Conclusion
In this article, we explained the basics of ASP.NET Core 3.1 and how to set up a machine to develop ASP.NET Core 2.1 applications.