Setting Up Your Environment
By the end of this lesson
Install the SDK, verify it works, and choose an editor.
Three steps, and the verification step is the one people skip and regret.
Install the .NET SDK
Download the current long-term support SDK from Microsoft's official .NET site. Choose the installer for your operating system. Take the SDK, not the runtime.
Verify the installation
Open a new terminal and run: dotnet --version. You should see a version number. If the command is not found, the installer did not add it to your PATH — reopening the terminal fixes this most of the time.
Install an editor
Visual Studio Code with the C# Dev Kit extension is a good cross-platform choice. Visual Studio is a heavier option on Windows with more built in. Either is fine; the course assumes neither.
# Version of the SDK in use
dotnet --version
# Everything installed, SDKs and runtimes separately
dotnet --info
# Confirm the toolchain works end to end
dotnet new console -o SetupCheck
cd SetupCheck
dotnet run- dotnet --info is the more useful diagnostic — it lists every SDK and runtime found, which resolves most version confusion.
- The last three lines are the real test. If you see output from a running program, your environment is working.
Summary
- Install the SDK, then verify with dotnet --version before going further
- dotnet --info lists everything installed and resolves most version confusion
- Open the project folder in your editor, not an individual file
Saved in this browser only.