Install the .NET SDK

This procedure walks you through installing the .NET SDK, the toolset that builds and runs C# code on the machine.


🧰 Prerequisites

None.

📋 Steps

  1. Go to dotnet.microsoft.com (external link).

  2. Click the Download button.

  3. Download the .NET SDK.

  4. Run the installer.

  5. Follow the steps. The default options are fine.

  6. Click Close when the installer is done.

🎯 Expected Outcome

  1. Open the Command Prompt.

  2. Type dotnet --version.

  3. If a version number prints, the .NET SDK is installed correctly.

⚠️ Mistakes

Not opening a fresh terminal after installing

A terminal reads the system configuration when it starts, so a terminal that was already open will not find a newly installed .NET SDK. Close any open terminal and open a new one, or restart VS Code, before checking the version.

Installing the .NET Runtime instead of the SDK

The download page offers both the SDK and the Runtime. The Runtime only runs a program that was already built, so dotnet commands that build a project will not work. Download the item labelled .NET SDK, not .NET Runtime.

Choosing the wrong build on macOS

An Arm64 build is for Apple Silicon Macs and an x64 build is for Intel Macs. Installing the wrong one can fail or behave unexpectedly. Check the chip on the Mac under the Apple menu, About This Mac, and match the build to it.

📚 Resources