Core API Setting Up Development Environment

A proper development environment is the first real step before writing any code. This topic covers everything needed to install and configure the tools that power an ASP.NET Core Web API project.

Tools Required

ToolPurposeDownload
.NET SDKCompiler and runtime for C# and ASP.NET Coredotnet.microsoft.com
Visual Studio 2022Full IDE with built-in ASP.NET Core templatesvisualstudio.microsoft.com
Visual Studio CodeLightweight code editor (alternative to VS 2022)code.visualstudio.com
PostmanTool to test API endpoints without writing a UIpostman.com
SQL Server ExpressFree database server for local developmentmicrosoft.com/sql-server
SQL Server Management Studio (SSMS)GUI to manage SQL Server databasesmicrosoft.com/ssms

Step 1 – Install the .NET SDK

The .NET SDK (Software Development Kit) is the core engine. It includes the compiler that turns C# code into a running application. Without the SDK, nothing else works.

Steps to install:

  1. Go to dotnet.microsoft.com/download
  2. Download the latest .NET 8 SDK (LTS – Long Term Support)
  3. Run the installer and follow the steps
  4. Open a command prompt and run the command below to verify installation
dotnet --version

Expected output (version number may differ):

8.0.100

If a version number appears, the SDK is installed correctly.

Step 2 – Install Visual Studio 2022

Visual Studio 2022 is the recommended IDE (Integrated Development Environment) for this course. It provides templates, IntelliSense (code suggestions), debugging tools, and NuGet package management — all in one place.

During installation, select the following workload:

  • ASP.NET and web development — This includes all templates and tools needed for Web API projects.

The Community edition of Visual Studio 2022 is completely free and has all the features needed for this course.

Step 3 – Install Postman

Postman is a tool for testing API endpoints. Instead of writing a frontend application just to call the API, Postman lets you send HTTP requests (GET, POST, PUT, DELETE) directly and see the responses in a clean interface.

Think of Postman as a "fake client" — it pretends to be an app and talks to the API so it can be tested quickly.

Postman sends:
  GET http://localhost:5000/api/books

BookStore API responds:
  [
    { "id": 1, "title": "Clean Code", "author": "Robert C. Martin" },
    { "id": 2, "title": "The Pragmatic Programmer", "author": "David Thomas" }
  ]

Step 4 – Install SQL Server Express and SSMS

SQL Server Express is a free, limited version of Microsoft SQL Server. It is more than capable for development and learning purposes. The BookStore API will use SQL Server to store book data permanently.

SSMS (SQL Server Management Studio) is a visual tool that lets you see the database, run queries, and check whether data was saved correctly — without writing any code.

Verifying the Full Setup

After installing all tools, open a command prompt and run these commands to confirm everything works:

dotnet --version
dotnet --list-sdks

Expected output:

8.0.100
8.0.100 [C:\Program Files\dotnet\sdk]

Understanding the .NET CLI

The .NET CLI (Command Line Interface) is a set of commands that can create, build, and run .NET projects from the terminal. Even when using Visual Studio, these commands run in the background. Knowing the key commands is helpful for troubleshooting.

CommandWhat It Does
dotnet new webapiCreates a new Web API project
dotnet runBuilds and starts the project
dotnet buildCompiles the project without running it
dotnet add package PackageNameInstalls a NuGet package
dotnet ef migrations add NameCreates a new database migration
dotnet ef database updateApplies migrations to the database

What Is NuGet?

NuGet is the package manager for .NET. It is like an app store for code libraries. When Entity Framework Core, JWT, AutoMapper, or Serilog are needed, they are installed through NuGet. NuGet downloads the library and makes it available inside the project automatically.

dotnet add package Microsoft.EntityFrameworkCore.SqlServer

This command installs the Entity Framework Core SQL Server library into the project. It will be used in a later topic to connect the BookStore API to SQL Server.

Key Points

  • The .NET SDK is required before anything else — it compiles and runs the code.
  • Visual Studio 2022 Community is free and includes all tools needed for this course.
  • Postman is used to test API endpoints during development.
  • SQL Server Express and SSMS handle local database storage and management.
  • The .NET CLI provides commands like dotnet run and dotnet build to manage projects from the terminal.

Leave a Comment