Back to: ASP.NET Core Web API Tutorials
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 the list of all Software Required for ASP.NET Core Web API Development. Tools and Software Requires for the Development of ASP.NET Core Web API Applications.
- Operating System: (Windows, Mac, Linux)
- Editor: Visual Studio 2019 (latest version), Visual Studio Code.
- 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.
- Database: SQL Server 2019
- SSMS (SQL Server Management Studio): To interact with SQL Server database
- 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 of your choice to develop .NET Core Applications. This is because .NET Core is an Open-Source and Cross-Platform framework. So, you can use any type of Operating System such as Windows, Mac, and Linux for ASP.NET Core Web API Application development. I am going to use Windows Operating System throughout this course but you can use any operating system.
Download and Install .NET Core SDK 6 (LTS)
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 SDK. The latest version as of this writing is .NET 7.0 and .NET 6 provides the Long Term Support which is the recommended one as shown in the below image. In this course, we are going to use .NET 6, and at the end of this course, I will discuss what are the new features introduced with .NET 7 with Real-Time Examples.
Further, in .NET 6, there are three options to download the .NET Core SDK which are as follows:
- .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.
- .NET SDK x64: 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.
- All .NET downloads: If you want an older version of .NET (like .NET Core 3.1, .NET 5), 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 of your choice.
As we are here to develop, build, run, and deploy .NET Core Applications, 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 SDK and will navigate to the below page which shows how to Run the Installer, Verify the Installation, and get started as shown in the below page.
Once you download the .NET SDK, then install it by double-clicking on the downloaded exe. Once you click on the EXE, it will open the following window and here simply click on the Install button as shown in the below image.
If everything is fine, once the installation is completed, you will get the following message saying the installation was successful. Simply click on the Close button as shown in the below image.
Note: If you installed .NET SDK on your machine, then there is no need to install .NET Runtime separately as .NET SDK automatically installed the .NET Runtime. The .NET Runtime is a part of the .NET SDK. Another point that you need to keep in mind is that, once you installed .NET SDK, then automatically ASP.NET Core gets installed.
Verifying the Installation of .NET:
Once you 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.
Now in order to verify what versions are installed on your machine, type the dotnet –info command in the command prompt and press enter button as shown in the below image.
As you can see in the above image, on my machine, 2 .NET SDK versions are installed i.e. 6.0.408 and 7.0.203. Along the way, it also displays the OS Name, Version, etc. Further, if you notice it also installed .NET Runtimes. Please make sure .NET 6 is installed on your machine as we are going to develop the applications using .NET 6.
Note: The .NET 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.
- Visual Studio 2022
- Visual Studio Code
- .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 2022 as the IDE for ASP.NET Core Web API development.
Download Visual Studio 2022:
If you have not installed Visual Studio 2022, 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 choose the Community Edition of Visual Studio 20229 which is free as shown in the below image and the community version has all the features of the enterprise edition has. Based on your operating system choose the right visual studio. As I am having Windows OS, so I am selecting Visual Studio Community Edition for Windows as shown in the below image.
Please check the below article which shows the step-by-step process to download and install Visual Studio 2022 Community Edition on Windows Operating System.
https://dotnettutorials.net/lesson/how-to-download-and-install-visual-studio-in-windows/
While installing Visual Studio 2022, please make sure ASP.NET and Web Development Workload are Installed. To verify, whether you have installed this workload or not, Open Visual Studio Installer and then click on the Modify Button of Visual Studio Community 2022 as shown in the below image.
Once you click on the Modify button, the following window will open. Here select the Workloads option from the menus and then make sure the ASP.NET and Web Development checkbox is checked as shown in the below image.
Note: If the above ASP.NET and Web Development are not checked, then please check the check box and click on the Modify button to install the same so that you can develop ASP.NET Core Web Applications.
How to Download and Install Visual Studio Code
Let us see how to Download and Install Visual Studio Code as some point in time, we are going to develop ASP.NET Core Web API Applications using 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.
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 11 Installed on my machine, so I Installed the Windows option as shown in the below image.
Once the download is completed, click on the setup file and follow the on-screen steps to Install Visual Studio Code on your machine. For the step-by-step process of downloading and installing Visual Studio Code, please check the below article.
https://dotnettutorials.net/lesson/how-to-download-and-install-visual-studio-code/
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, and 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 of 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 Web APIs, we need some data. You can hard code the data in memory. But in Real-time, we need to work with databases. As a database, in this course, 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.
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 it, then install it by following the on-screen steps. Please check the below article for the step-by-step process of downloading and installing SQL Server.
https://dotnettutorials.net/lesson/how-to-download-and-install-sql-server/
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 the form of Tables. We can create relationships between the tables. You can use SQL Server from any other server from your local machine.
Download and 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.
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. Please check the below article to know the step-by-step process to download and install SSMS.
https://dotnettutorials.net/lesson/how-to-download-and-install-ssms/
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.
Once you download it, 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 HTTP (HyperText Transport Protocol) i.e. HTTP Verbs or Methods, HTTP Status Codes, HTTP Requests, and Responses. 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.
Please add a tutorial for React