.NET & C# Development · Lesson 13 of 229
Setting Up Your Machine for .NET — Windows, macOS & Linux
A consistent dev environment prevents "works on my machine" before you write business logic. This guide targets ASP.NET Core work on Windows, macOS, and Linux.
Related: C# basics · OrderFlow scaffold · Course: Module 0
1. Install the .NET SDK
Download from https://dotnet.microsoft.com/download. Install the latest LTS or current SDK your team standardizes on (e.g. .NET 8 LTS for production, .NET 9/10 for learning new features).
dotnet --version
dotnet --list-sdksYou need the SDK, not just the runtime, to build and run dotnet new, tests, and publish.
Multiple SDK versions
Side-by-side SDKs are normal. Pin a repo with global.json:
{
"sdk": {
"version": "8.0.404",
"rollForward": "latestFeature"
}
}2. Choose an IDE
| Tool | Best for | |------|----------| | Visual Studio 2022 (Windows) | Full-stack .NET, debugging, profiling, Azure tooling | | VS Code + C# Dev Kit | Cross-platform, lightweight, Docker/Git integrated | | Rider | Cross-platform, strong refactoring (paid) |
Minimum VS Code extensions:
- C# Dev Kit (or C# extension)
- REST Client or Thunder Client (API testing)
- Docker (optional)
- GitLens (optional)
3. Git and SSH
git config --global user.name "Your Name"
git config --global user.email "you@company.com"
ssh-keygen -t ed25519 -C "you@company.com"Use SSH remotes with GitHub/Azure DevOps. Enable branch protection and PR reviews on team repos.
4. Docker (recommended for APIs)
Containers give you local Postgres, Redis, and Seq matching production.
- Windows: Docker Desktop (WSL2 backend)
- macOS: Docker Desktop
- Linux: Docker Engine + Compose plugin
docker --version
docker compose versionVerify with a hello container:
docker run --rm hello-worldYou'll use Docker heavily in production deployment.
5. Database tools
Pick one:
- Azure Data Studio / SSMS for SQL Server
- pgAdmin or DBeaver for PostgreSQL
- TablePlus (cross-platform)
Match what OrderFlow (or your app) uses in appsettings.Development.json.
6. Secrets — never commit credentials
Local development:
cd src/OrderFlow.Api
dotnet user-secrets init
dotnet user-secrets set "ConnectionStrings:Default" "Server=localhost;..."
dotnet user-secrets set "Jwt:SigningKey" "dev-only-key-min-32-chars-long!!"Production: environment variables, Azure Key Vault, or your host's secret store — see configuration guide.
7. Optional but high-value tools
| Tool | Purpose |
|------|---------|
| httpie or Postman | Manual API calls |
| nfes / nvm | Node only if you run a React front-end |
| az CLI | Azure deployments |
| gh CLI | GitHub PRs and Actions logs |
8. First project smoke test
dotnet new webapi -n DevSetupSmokeTest --use-controllers false
cd DevSetupSmokeTest
dotnet runBrowse to the HTTPS URL shown in the console. If Swagger/OpenAPI loads, your SDK and IDE debugger are wired.
Platform notes
Windows
- Prefer WSL2 for Docker Linux containers.
- Long path support can matter for deep
node_modules+ .NET repos.
macOS (Apple Silicon)
- Install ARM64 .NET builds natively; Rosetta only if you depend on x64-only tools.
Linux
- Install SDK via package feed or
dotnet-install.sh. - For VS Code, install
.NETdependencies documented for your distro.
Checklist before joining a team codebase
- [ ]
dotnet testpasses onmain - [ ] User secrets or
.envdocumented in README (not committed) - [ ] Docker Compose brings up DB + cache
- [ ] IDE launches with correct launch profile
- [ ] HTTPS dev certificate trusted (
dotnet dev-certs https --trust)
Next: What's new in C# 14 · Start OrderFlow