Installation & Setup
Install the .NET SDK and set up your development environment on Windows, macOS, or Linux.
Installing the .NET SDK
Download the .NET SDK from the official site at dotnet.microsoft.com/download. Choose the latest LTS (Long Term Support) version — at the time of writing, that's .NET 8. Installers are available for Windows, macOS, and Linux, and the download page automatically detects your operating system.
Always prefer the LTS release for learning and production use, as covered in the history lesson — LTS versions get support and security updates for three years, versus 18 months for the in-between "Standard Term Support" releases.
Platform-Specific Notes
Windows
Run the .exe installer directly, or install via winget from a terminal: winget install Microsoft.DotNet.SDK.8
macOS
Run the .pkg installer, or install via Homebrew: brew install dotnet-sdk (Homebrew installs may lag slightly behind the official release).
Linux
Distribution-specific package managers work (apt, dnf, etc.), or use Microsoft's official install script for the most reliable, up-to-date result: curl -sSL https://dot.net/v1/dotnet-install.sh | bash
The fact that a single, official install script works identically across every Linux distribution is a direct, deliberate consequence of .NET's 2016 open-source rewrite — the exact same underlying runtime binaries run everywhere, rather than each distro needing its own separately-compiled version.
Verifying the Installation
Open a terminal and run the following command to confirm .NET installed correctly:
dotnet --versionClick Run to see what this code prints.
For a fuller picture of exactly what got installed, dotnet --info prints the SDK version, runtime version, and even the underlying operating system/architecture details — genuinely useful when troubleshooting an issue or reporting a bug.
dotnet --infoChoosing an Editor
For this course, Visual Studio Code is recommended — it is free, lightweight, and works identically on Windows, macOS, and Linux. Visual Studio (the full IDE, Windows/macOS only) is a great choice too if you're already on a supported platform and want deeper tooling for larger projects, and everything you type in this course will work identically in either editor.
Setting Up VS Code
- Download and install VS Code from code.visualstudio.com.
- Open the Extensions panel (Ctrl+Shift+X / Cmd+Shift+X) and install the "C# Dev Kit" extension.
- Restart VS Code — it will prompt you to install any remaining C# tooling (like the language server) automatically.
- Open a folder containing a .csproj file, and VS Code will automatically detect it as a C# project and enable IntelliSense (autocomplete).
Troubleshooting Common Setup Issues
| Symptom | Likely Cause | Fix |
|---|---|---|
| "dotnet: command not found" | The SDK's install location isn't on your system PATH | Restart your terminal (or your whole machine) after installing — this refreshes the PATH in most cases |
| VS Code shows no IntelliSense/autocomplete | The C# Dev Kit hasn't finished installing its language server yet | Wait a minute after opening a project, or check the Output panel for "C#" logs showing progress |
| dotnet --version shows an older version than expected | A previous SDK install wasn't fully removed, or multiple versions are installed | Run dotnet --list-sdks to see everything installed side-by-side |
Common Beginner Mistakes
The PATH environment variable is usually only refreshed for new terminal sessions — an already-open terminal window often still won't recognize the dotnet command until reopened.
The official download page sometimes prominently features the newest preview release — for learning and production, always choose the current stable LTS version instead.
FAQs
No — modern .NET runs identically on Windows, macOS, and Linux, and every example in this course works the same on all three.
Yes, Visual Studio Community edition is free for individual developers, students, and open-source projects (with some usage restrictions for larger organizations).
Yes — they don't conflict, and many developers switch between them depending on the project.
No — the C# compiler (Roslyn) is bundled directly into the SDK you already installed; there's nothing separate to add.
Summary
- Install the .NET SDK (prefer the current LTS version) for your specific operating system.
- Verify with dotnet --version (or dotnet --info for full details).
- VS Code + C# Dev Kit is a great free, cross-platform setup used throughout this course.