Setting Up Your Machine
This page walks through each install in more detail than the Prerequisites checklist.
.NET 10 SDK
- Download the .NET 10 SDK installer for your operating system from dotnet.microsoft.com. Choose the SDK, not the runtime.
- Run the installer.
-
Open a new terminal (PowerShell, Command Prompt, or a shell) and confirm:
dotnet --list-sdksoutput10.0.100 [C:\Program Files\dotnet\sdk] -
Trust the HTTPS development certificate so the API runs over
https://localhostwithout warnings:dotnet dev-certs https --trust
EF Core tools
Module 2 uses the EF Core command-line tools to create migrations. Install them once as a global tool:
dotnet tool install --global dotnet-ef
dotnet ef --version
Editor
Any of these work well for the workshop. Choose the one you already know.
Install the ASP.NET and web development workload. .http files open in the built-in HTTP editor with a Send Request link above each request.
Install the C# Dev Kit extension. For .http files, install REST Client (by Huachao Mao). Optionally add SQLite Viewer to inspect the database.
Rider includes C# support and an HTTP client for .http files out of the box.
Git and the workshop repo
git clone https://github.com/cwoodruff/aspnet-minimal-api-workshop.git
cd aspnet-minimal-api-workshop
git tag
You should see start and checkpoint-1 through checkpoint-5. These tags are the backbone of the day:
startis the empty starter, identical to thesrc/00-startproject. Begin here.checkpoint-Nis the code exactly as it stands at the end of Lab N.
During the day, if you fall behind or something breaks that you cannot fix in a minute, jump to the nearest checkpoint and keep going with the group:
git stash # optional: keep your work to look at later
git checkout checkpoint-2
When you want to return to the branch you were building on, git switch - takes you back.
warning Detached HEAD is expected
git checkout checkpoint-2 leaves you on a tag, not a branch, so Git prints a "detached HEAD" notice. That is fine for following along. If you want to keep commits from a checkpoint, branch first with git switch -c my-lab2 checkpoint-2.
The source layout
Everything you run during the day lives under src/, described in src/README.md:
The .http request files for each module are in the http/ folder at the repo root.
Verify the whole thing builds
From the start tag (or any checkpoint), a full restore and build confirms your SDK and packages are healthy:
git checkout checkpoint-5 # the finished solution
dotnet build src/Roastery.slnx
dotnet test src/Roastery.Tests
You should see a successful build and four passing tests. Then run the finished API to see where the day is headed:
dotnet run --project src/Roastery.Payments # https://localhost:7281
dotnet run --project src/Roastery.Api # https://localhost:7181
Browse to https://localhost:7181/scalar/v1 for the API document, and sign in with a seed account (listed in src/README.md, e.g. barista@roastery.dev / Barista1!). When you are done exploring, git switch - returns you to your own branch.
Docker Desktop or Podman (recommended)
Module 5 builds an OCI image with dotnet publish and runs it locally. Install Docker Desktop or Podman and confirm the daemon is running:
docker run --rm hello-world
The .NET Aspire AppHost also uses a container runtime when you swap in a Postgres resource during the Module 5 stretch goal.
.NET Aspire
Module 5 uses .NET Aspire for local orchestration and the dashboard. The Aspire packages restore with the rest of the solution, but building and running the AppHost additionally needs the Aspire CLI (the dashboard and orchestrator bundle). Install it once:
curl -sSL https://get.aspire.dev | bash
aspire --version
iex "& { $(irm https://get.aspire.dev/install.ps1) }"
aspire --version
To pre-cache the Aspire packages before the day, restore the finished solution once:
git checkout checkpoint-5
dotnet restore src/Roastery.slnx
The other four projects (API, Payments, Tests, ServiceDefaults) build and run without the Aspire CLI, so you can complete most of Module 5 even if this install gives you trouble; only running the AppHost and its dashboard depends on it.
A lifeboat
If corporate policy blocks downloads on your laptop, ask the instructor at the start of the day. A shared drive with the SDK installers and a zipped copy of the repo is available in the room.