Getting Started With ASP.NET Core - Part One

Introduction

 
This article talks about ASP.NET Core, ASP.NET Core features, versions of ASP.NET Core, why we are using ASP.NET Core, and how to configure Visual Studio for developing a simple web application using ASP.NET Core.
 
Definition
 
ASP.NET Core is a cross-platform and open source framework. ASP.NET Core supports Windows, Mac, and Linux operation system. It is used for developing modern, cloud-based, and high-performance web applications.
 

Why ASP.NET Core

 
ASP.NET Core provides core and extra features which means it is supported in .NET Framework and .NET Core. It supports cross-platform applications that work on Windows, Linux, and Mac operating systems. We can build Desktop, Web, Cloud, Mobile, Gaming, IoT, and AI applications using ASP.NET Core.
 

.NET Core Versions

 
Getting Started With ASP.NET Core
 

.NET Core Version History

 
The below table shows the ASP .NET Core versions with their release dates and supported version of Visual Studio.
 
Version
Release Date
Release With
Support .NET Core Version
.NET Core 1.0
27-Jun-2016
Visual Studio 2015 Update 3
1.0
.NET Core 1.1
16-Nov-2016
Visual Studio 2017 Version 15.0
1.0, 1.1
.NET Core 2.0
14-Aug-2017
Visual Studio 2017 Version 15.3
 1.0, 1.1, 2.0
.NET Core 2.1
30-May-2018
Visual Studio 2017 Version 15.7
 1.0, 1.1, 2.0, 2.1
.NET Core 2.2
04-Dec-2018
Visual Studio 2017 Version 15.9
 1.0, 1.1, 2.0, 2.1, 2.2
.NET Core 3.0 Preview 6
12-Jun-2019
Visual Studio 2019
 1.0, 1.1, 2.0, 2.1, 2.2, 3.0
 

ASP.NET Core Benefits

  • Supports Multiple Platforms.
  • Improved performance.
  • No longer depends on System.Web.dll.
  • Built-in IOC container for automatic dependency injection.
  • Integration with Modern UI Frameworks.
  • The application can be hosted on multiple platforms.
  • Support for cloud-based development.
  • NET Core support Command Line Interface for major platforms.
  • Open-source and community-focused.
  • Side-by-Side App Versioning.
Platform Support
 
Getting Started With ASP.NET Core
 

ASP.NET Core Environment Setup

 
We need to install the following tools for developing an ASP.NET Core application.
  • .NET Core SDK
  • Integrated Development Environment (IDE)
.NET Core SDK
 
.NET Core SDK is the Software Development Kit. It is a set of tools and libraries and it helps developers in creating the ASP.NET Core applications. .NET Core CLI, Libraries, and Runtime are used to build and run the ASP.NET Core application.
 
We need to download the .NET Core SDK from this link and install it on our system. Once we've entered the above URL, we can find different versions, just like the below screen. We have a different type of SDK for a different type of operating system. Select the operating system and download the SDK then install to your machine.
 
We have different types of SDKs for each operating system. One is .NET Core Runtime, this is only used to run the application. Using this, we cannot develop the application. The second one is .NET Core SDK, this is mainly used to build and run the applications.
 
There are three important steps in .NET Core SDK.
 
Getting Started With ASP.NET Core
 
Step 1 - Run Installer
 
After completing the download, run the EXE and complete the steps to install .NET Core on your machine.
 
Getting Started With ASP.NET Core
 
Step 2 - Verify Installation
 
When the installer completes, open a new command prompt and run the dotnet command. This will verify that .NET is correctly installed and ready to use. If not installed correctly, we will be getting an error.
 
Getting Started With ASP.NET Core
 
Step 3 - Get Started
 
Now that we have got .NET Core SDK installed, let's build our application using .NET Core.
 
Integrated Development Environment (IDE)
 
IDE is used to develop, restore, build the .NET Core and all other applications. Here, we are using Visual Studio 2017; however, we can use the Visual Studio Code also. If we have installed Visual Studio version 2017 or 2019, there is no need to install SDKs because they will be installed automatically while installing Visual Studio.
 
We can download the Visual Studio from this link and install to develop the application. Go through this article link to learn to install the Visual Studio 2017.
 
Command Line Interface (CLI)
 
.NET Core supports the Command Line Interface. It is used to Create, Compile, Build, Restore and Run the .NET Core application. .NET Core SDK installs the command line interface also so there is no need to install CLI separately. We can verify the CLI by opening the command prompt and typing dotnet. We have a lot of commands there in CLI. We will discuss them in an upcoming article.
 

Conclusion

 
This article explained the basics of ASP.NET core and the necessary steps to set up an environment to develop the .NET Core applications. I hope this really helps to new learners, students, and freshers.