Environment Setup for ASP.NET Core Web API Development

Environment Setup for ASP.NET Core Web API Development

In this article, I am going to discuss the Environment Setup required for developing ASP.NET Core Web API Applications. Please read our previous article where we discussed HTTP Protocols. Tools and Software Requires for the development of ASP.NET Core Web API Applications.

  1. Operating System: (Windows, Mac, Linux)
  2. Editor: Visual Studio 2019 (latest version), Visual Studio Code. 
  3. Dot Net Core SDK 5 (Latest Version as of this writing): This is the software development KIT and this KIT is helpful for the development and running of the application in the system.
  4. Database: SQL Server 2019
  5. SSMS (SQL Server Management Studio): To interact with SQL Server database
  6. API Client: Postman, Fiddler. These are client tools and are used to test the Web APIs
Operating System:

You are free to use any operating system as per your choice. .NET Core is an open-source and cross-platform framework. So, you can use any type of Operating System such as Windows, Mac, and Linus for ASP.NET Core Web API Application development. I am going to use Windows Operating System.

Download and install .NET Core SDK 5 (Latest Version)

Once you decide Operating System, next you need to install .NET Core SDK on that machine. In order to download .NET Core SDK, please go to the below Website.

https://dotnet.microsoft.com/download

Once you go to the above website, you will find the following webpage. As per your operating system choose the appropriate .NET Core SDK. The latest version as of this writing is .NET 5.0 and this is the recommended one as shown in the below image.

Download and install .NET Core SDK 5 (Latest Version)

Further, in .NET 5, there are three options to download the .NET Core SDK which are as follows:

  1. .NET Runtime: The .NET Runtime is required only to run .NET Core applications. The .NET Runtime just contains the resources or libraries that are required to run existing .NET Core applications.
  2. .NET SDK: If you want to develop, build, run, test, and deploy your .NET Core Applications, then you need to download the .NET SDK (Software Development Kit). The .NET SDK also contains.NET Runtime. So, if you installed the .NET SDK, then there is no need to install .NET Runtime separately. 
  3. All .NET downloads: If you want an older version of .NET (like .NET Core 3.1), 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 we are here to develop, build, run and deploy .NET Core Applications, so we need to click on the Download .NET SDK x64 link. Once you click on the Download .NET SDK x64 button it will download the .NET Core SDK.

Once you download the .NET SDK, then install it by following the required steps. If everything fine, once the installation completed, you will get the following.

Environment Setup for ASP.NET Core Web API Development

Note: If you installed .NET Core SDK on your machine, then there is no need to install .NET Runtime separately as .NET Core SDK automatically the .NET Runtime. The .NET Runtime is a part of .NET SDK. Another point that you need to keep in mind is that, once you installed .NET Core SDK, then automatically ASP.NET Core gets installed.

Verifying the Installation:

Once you’ve installed .NET SDK, open the command prompt and type dotnet and press the enter key as shown in the below image. If the installation succeeded, then you should get the following output.

Environment Setup required for developing ASP.NET Core Web API Applications

Now in order to verify what versions installed on your machine, type the dotnet –info command in the command prompt and press enter as shown in the below image.

Verifying the Installation of .NET Core SDK

As you can see in the above image, in my machine, .NET SDK version 5.0.201 is installed. Along the way, it also displays the OS Name, Version, etc. Further, if you notice it also installed .NET Runtimes.

Note: The .NET Core SDK will give a complete environment to develop, build, test and deploy the ASP.NET Core Web API Applications.

Integrated Development Environment (IDE) for ASP.NET Core Web API Development:

You can use any of the following IDEs to develop the ASP.NET Core Web API Applications.

  1. Visual Studio 2019
  2. Visual Studio Code
  3. .Net Core CLI

We will discuss using all the above options to develop the ASP.NET Core Web API Applications. But from the beginning, we are going to use Visual Studio 2019 as the IDE for ASP.NET Core Web API development. 

Download Visual Studio 2019:

If you have not installed Visual Studio 2019, then please download and installed Visual From the below URL.

https://visualstudio.microsoft.com/downloads/

Once you navigate to the above URL, and if you are a student and you just want to learn ASP.NET Core Web API, then I recommended you to choose the Community edition of Visual Studio 2019 which is free as shown in the below image and the community version has all the features of the enterprise edition has.

Download Visual Studio 2019

While installing Visual Studio 2019, please make sure ASP.NET and Web development workload is installed. To verify this, whether you have installed this workload or not, Open Visual Studio Installer and then click on the Modify button as shown in the below image.

Download Visual Studio 2019

Once you click on the Modify button, the following screen window will open. Here select the Workloads option and then make sure the ASP.NET and Web Development checkbox to be checked as shown in the below image.

Integrated Development Environment (IDE) for ASP.NET Core Web API Development

How to Download and Install Visual Studio Code

Let us see how to download and install Visual Studio Code. In order to download Visual Studio Code, please click on the following link.

https://code.visualstudio.com/

Once you click on the above link, it will open the below website, from this webpage just click on the Download button which you can see at the top of the website as shown below.

How to Download and Install Visual Studio Code

Once you click on the Download button, it will open the following page. Based on your operating system choose the appropriate visual studio. I have windows 10 installed on my machine, so I installed the Windows option as shown in the below image.

How to Download and Install Visual Studio Code for ASP.NET Core Web API Development

Once the download completed, click on the setup file follow the on-screen steps to install Visual Studio on your machine.

Visual Studio Code is a lightweight but powerful source code editor which runs on your desktop and is available for Windows, macOS, and Linux. It comes with built-in support for JavaScript, TypeScript, and Node.js and has a rich ecosystem of extensions for other languages (such as C++, C#, Java, Python, PHP, Go) and runtimes (such as .NET and Unity).

Note: Visual Studio and Visual Studio Code are editors. They will help us to write the code quickly. But you are free to use any editor as per your choice such as Notepad ++, Atom, Sublime, etc.

Install SQL Server 2019:

Next, we are going to install SQL Server 2019. Remember we are going to develop Web APIs and to work with Wen APIs, we need some data. You can hard code the data in memory. But in Real-time, we need to work with a database. As a database, in this tutorial, we are going to use SQL Server. If you have not installed SQL server 2019 on your machine, then please download and installed it from the below URL.

https://www.microsoft.com/en-ie/sql-server/sql-server-downloads

Once you click on the above link, it will open the below page. Here we have many options to use SQL Server database. Here, click on the Download now button which is below the Developer tab as shown in the below image.

Install SQL Server 2019

SQL Server 2019 Developer is a full-featured free edition, licensed for use as a development and test database in a non-production environment. Once you download, then install it by following the on-screen steps.

SQL Server is a DBMS and provides the complete environment to save and work with the data of an application. SQL Server stores the data in form of Tables. We can create relationships between the tables. You can use SQL Server from any other server from your local machine.

Install SQL Server Management Studio:

Once you have installed the SQL Server database, then you need an interface to interact with the SQL Server Database. And for that, we are going to use SQL Server Management Studio (SSMS) to interact with the SQL Server database. If you have not installed SSMS on your machine, then please download and installed the SQL Server Management Studio from the below link.

https://docs.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms

Once you go to the above link, it will open the below webpage and simply click on the Download SQL Server Management Studio (SSMS) link as shown in the below image.

Install SQL Server Management Studio

Once you download SSMS, then install it. SQL Server Management Studio (SSMS) is an integrated environment for managing any SQL infrastructure, from SQL Server to Azure SQL Database. SSMS provides tools to configure, monitor, and administer instances of SQL Server and databases. Use SSMS to deploy, monitor, and upgrade the data-tier components used by your applications, and build queries and scripts.

Use SSMS to query, design, and manage your databases and data warehouses, wherever they are – on your local computer, or in the cloud.

Install Postman:

As we are going to work with the Web API, we also need one Web API client tool. And for the client tool, we are going to use Postman. In order to install Postman, click on the below link.

https://www.postman.com/downloads/

Once you click on the above link, it will open the below webpage. From the below page, click on the Download the App link to download postman on your machine. Depending upon your operating system, you can choose either 32-bit or 64-bit. I have installed a 64-bit operating system and so, I choose Windows 64 bit as shown in the below image.

Install Postman

Once you download, then install it. A postman is an API tool. Postman provides a complete and nice interface to work with APIs.

That’s it. We are ready with our environment to develop ASP.NET Core Web API Applications. In the next article, I am going to discuss How to Create, Build, Run, and Test ASP.NET Core Web API Application using .NET Core CLI. Here, in this article, I explain the Environment Setup for ASP.NET Core Web API Application Development and I hope you enjoy this ASP.NET Core Web API Environment setup for Development article.

Leave a Reply

Your email address will not be published. Required fields are marked *