ASP.NET Core is a cross-platform, high-performance, open-source framework for building modern, cloud-enabled, Internet-connected apps. With ASP.NET Core, you can: Build web apps and services, Internet of Things (IoT) apps, and mobile backends. Use your favorite development tools on Windows, macOS, and Linux.
ASP.NET Core Environment Setup
In this Video, I am going to discuss the ASP.NET Core Environment Setup required for developing ASP.NET Core application. Please read our previous Video before proceeding to this Video where we gave a brief introduction to ASP.NET Core . As part of this Video, we are going to discuss the following pointers.
- How to set up a development machine for dot net core applications development
- Install SDK and Editor
- Verify the installation
Tools and Software Requires for the development of .NET Core Applications.
Machine: (Windows, Mac, Linux)
Editor: Recommended Visual Studio, VS Code
Dot Net Core SDK: This is the software development KIT and this KIT is helpful for the development and running of the application in the system.
How to prepare a development environment for building .NET Core/ASP.NET Core applications?
The .NET Core can be installed in two ways:
- By Installing Visual Studio 2017/2019
- By Installing .NET Core SDK
The .NET Core SDK installer already contains ASP.NET Core libraries, so there is no separate installer for ASP.NET Core.
Install Visual Studio 2017/2019:
Currently, .NET Core 2.1 and .NET Core 3.1 is having Long Term Support (LTS). Visual Studio 2017 supports .NET Core 2.1, whereas Visual Studio 2019 supports both the versions.
You can use your favorite IDE, such as Visual Studio 2017/2019, Visual Studio Code, and Sublime Text, etc. to develop, restore, build and run .NET Core application. In my machine, I have installed Windows operating system. So, I am going to use Visual Studio as my editor, or you can say Integrated Development Environment (IDE) for developing ASP.NET Core application. But this is not mandatory. You can use any editor as per your choice.
If you dont have Visual Studio on your development PC, then it is recommended to install the latest Visual Studio 2019. If you already have either Visual Studio 2017 or 2019, then you already have installed .NET Core SDK 2.1.
Download and install Visual Studio
Download and install Visual Studio 2019 based on your OS. Select the appropriate edition as per your license. The Visual Studio community edition is free for students, open-source contributors, and individuals. As of this Video, the latest version of Visual Studio is Visual Studio 2019 and it can be downloaded from the following site
Once you visit the above website, you will see the following.
Based on your operating system download the required Visual Studio. In my machine, I have installed the Windows Operating System, so I choose Visual Studio and select the Community Edition and download it.
To develop .NET Core applications in Visual Studio 2019 we need .NET Core cross-platform development. So, while installing the Visual Studio 2019, please make sure to select the .NET Core cross-platform development workload checkbox as shown in the below image. This will install the .NET Core SDK 2.1. However, you need to install .NET Core 3.1 SDK separately if by default not available while installing Visual Studio 2019.
If you already have installed the Visual Studio 2019, then make sure the above .NET Core cross-platform development is installed. If not installed, then you just install this by using Visual Studio Installer.
Once you installed, then you can verify the same using command prompt (Windows OS) and Terminal (Linus OS). As in my Machine, I have installed Windows Operating System, So, I can verify the same using the “dotnet –version” command as shown in the below image.
If the .NET Core Framework installed successfully, in your machine, they will see the version number as shown in the above image.
Download and install .NET Core SDK
If Visual Studio 2019 installer doesnt include .NET Core 3.x then you need to install it separately. The ASP.NET Core is a part of .NET Core SDK, so you dont require to install it separately. To download the later version of .NET Core i.e. 3.1 as of today date, go to the following website and select the platform you are using.
Once you visit the above page, you will find the following. Here you will find two things as shown in the below image
As you can see, when we select the Windows option, then we have two options to develop .NET Core Application i.e. .NET Core 3.1 and .NET Framework 4.8. As you can see in the above image, .NET Core is a cross-platform of .NET for building websites, services, and console apps. On the other hand, .NET Framework is a Windows-only version of .NET for building any type of app that runs on Windows only. Here we are going with .NET Core 3.1 which is the latest version of .NET Core Framework as of this writing.
Further, in .NET Core there are three options are as follows:
.NET Core Runtime: The .NET Core Runtime is required only to run .NET Core applications. The .NET Core Runtime just contains the resources or libraries which are required to run existing .NET Core applications.
.NET Core SDK: If you want to develop and run the .NET Core application, then you need to download the .NET Core SDK. The .NET Core SDK contains the .NET Core Runtime. So, if you installed the .NET Core SDK, then there is no need to install .NET Core Runtime separately.
All .NET Core downloads: If you want an older version of .NET Core, then you need to click on this link and it will navigate to another page, from where you can download the .NET core Framework version as per your choice as shown in the below image.
As we are going to set up a development environment for developing and running .NET Core Applications, so, we need to install .NET Core SDK.
Click on the Download .NET Core SDK button to download the latest version of .NET Core SDK. It will download the .NET Core 3.1 SDK as of this writing. After downloading the installer, click on it to start the installation.
Verify the installation
Once you install.NET Core SDK then again you can verify the same using the command prompt. Open Command Prompt and type dotnet –version command and press enter. If the .NET Core Framework installed successfully, in your machine, then you will see the version number as shown in the above image.