Technical requirements
To work with the ASP.NET Core 6 minimal APIs you need to install, first of all, .NET 6 on your development environment.
If you have not already installed it, let’s do that now:
- Navigate to the following link: https://dotnet.microsoft.com.
- Click on the Download button.
- By default, the browser chooses the right operating system for you, but if not, select your operating system at the top of the page.
- Download the LTS version of the .NET 6.0 SDK.
- Start the installer.
- Reboot the machine (this is not mandatory).
You can see which SDKs are installed on your development machine using the following command in a terminal:
dotnet –list-sdks
Before you start coding, you will need a code editor or an Integrated Development Environment (IDE). You can choose your favorite from the following list:
- Visual Studio Code for Windows, Mac, or Linux
- Visual Studio 2022
- Visual Studio 2022 for Mac
In the last few years, Visual Studio Code has become very popular not only in the developer community but also in the Microsoft community. Even if you use Visual Studio 2022 for your day-to-day work, we recommend downloading and installing Visual Studio Code and giving it a try.
Let’s download and install Visual Studio Code and some extensions:
- Navigate to https://code.visualstudio.com.
- Download the Stable or the Insiders edition.
- Start the installer.
- Launch Visual Studio Code.
- Click on the Extensions icon.
You will see the C# extension at the top of the list.
- Click on the Install button and wait.
You can install other recommended extensions for developing with C# and ASP.NET Core. If you want to install them, you see our recommendations in the following table:
Additionally, if you want to proceed with the IDE that’s most widely used by .NET developers, you can download and install Visual Studio 2022.
If you don’t have a license, check if you can use the Community Edition. There are a few restrictions on getting a license, but you can use it if you are a student, have open source projects, or want to use it as an individual. Here’s how to download and install Visual Studio 2022:
- Navigate to https://visualstudio.microsoft.com/downloads/.
- Select Visual Studio 2022 version 17.0 or later and download it.
- Start the installer.
- On the Workloads tab, select the following:
- ASP.NET and web development
- Azure Development
- On the Individual Components tab, select the following:
- Git for Windows
All the code samples in this chapter can be found in the GitHub repository for this book at https://github.com/PacktPublishing/Minimal-APIs-in-ASP.NET-Core-6/tree/main/Chapter01.
Now, you have an environment in which you can follow and try the code used in this book.