Install the .NET 10 SDK & Set Up

C# · Lesson 2 of 31 7 min read Updated

Before you can write C#, you need the .NET SDK on your computer. The SDK (Software Development Kit) contains the C# compiler, the .NET runtime, the base class library and the dotnet command-line tool that you will use in every lesson.

In this lesson you will install the .NET 10 SDK, check that it works, pick an editor and create a tiny test program.

SDK or runtime?

The .NET download page offers several packages, and choosing the wrong one is the most common setup mistake.

PackageWhat it doesWho needs it
.NET SDKBuilds and runs programs; includes all runtimesDevelopers (you)
.NET RuntimeOnly runs console programsPeople who just use an app
ASP.NET Core RuntimeOnly runs web appsServers that host a web app
.NET Desktop RuntimeOnly runs Windows desktop appsUsers of WPF or Windows Forms apps

Always install the SDK. It already contains every runtime, so you do not need to install them separately. Choose .NET 10, the current LTS (long-term support) release.

Installing on Windows

You have three good options. Pick one.

  1. Installer: open https://dotnet.microsoft.com/download, choose .NET 10, and download the SDK installer for x64 (most laptops) or Arm64 (some newer thin laptops). Run it and accept the defaults.
  2. WinGet: Windows 11 includes the Windows Package Manager. Open PowerShell and run the command below.
  3. Visual Studio 2026: if you install Visual Studio with the ".NET desktop development" or "ASP.NET and web development" workload, it installs a .NET 10 SDK for you.
PowerShell
winget install Microsoft.DotNet.SDK.10

The SDK is installed into C:\Program Files\dotnet, and the installer adds that folder to your PATH. Close any terminal windows that were open during the install and open a fresh one, otherwise the dotnet command will not be found.

Installing on Linux and macOS

On Ubuntu 26.04 and 24.04, .NET 10 is in Ubuntu's own package feed:

Terminal
sudo apt-get update
sudo apt-get install -y dotnet-sdk-10.0

On older Ubuntu releases such as 22.04, you first add the .NET backports repository with sudo add-apt-repository ppa:dotnet/backports, then run the same install command. Other Linux distributions have their own packages; the official install pages list them.

On macOS, download the .pkg installer for .NET 10 from the same download page. Choose Arm64 for Apple silicon Macs (M1 and later) and x64 for older Intel Macs.

Check the installation

Open a terminal (PowerShell, Command Prompt or a Linux/macOS terminal) and ask dotnet for its version:

Terminal
dotnet --version
dotnet --list-sdks
Output
10.0.100
10.0.100 [C:\Program Files\dotnet\sdk]

Your numbers will probably be a little higher, because Microsoft releases a patch roughly every month (for example 10.0.1xx or 10.0.2xx). What matters is that the first number is 10. If you have older SDKs installed too, --list-sdks shows all of them; the newest one is used by default.

For a full report, including the operating system and runtimes, run dotnet --info. Paste that output when you ask someone for help.

Choose an editor

You can write C# in any text editor, but a good editor shows errors as you type, completes code for you and lets you debug step by step.

EditorPlatformsCostNotes
Visual Studio Code + C# Dev KitWindows, Linux, macOSFree for students and individualsLight and popular; install the "C# Dev Kit" extension from Microsoft
Visual Studio 2026 CommunityWindowsFree for students and individualsFull IDE with designers and a powerful debugger
JetBrains RiderWindows, Linux, macOSFree for non-commercial useStrong refactoring tools

This course uses only the dotnet command in the terminal, so every example works with any editor. If you are unsure, start with VS Code and the C# Dev Kit: it is small, works on every system and shows you exactly what the terminal commands do.

Create and run a test app

Now make sure everything works end to end. Create a folder for your course work and run three commands:

Terminal
dotnet new console -o HelloRohtak
cd HelloRohtak
dotnet run
Output
Hello, World!

Here is what happened:

  • dotnet new console created a new project from the "Console App" template in a folder named HelloRohtak. A project is a folder with a .csproj file that describes how to build your program.
  • cd HelloRohtak moved into that folder.
  • dotnet run compiled the code and ran it. The first run takes a few seconds; later runs are faster because only changed files are rebuilt.

If you see Hello, World!, your setup is complete. You will look inside this project in the next lesson, Your First C# Program.

Common mistakes

  • dotnet is not recognised. The terminal was opened before installing. Close it and open a new one. If it still fails on Windows, check that C:\Program Files\dotnet is in your PATH.
  • Installed the runtime, not the SDK. dotnet --list-sdks prints nothing. Install the SDK.
  • "No .NET SDKs were found." On Windows this usually means both the 32-bit (x86) and 64-bit SDKs are installed and the x86 one comes first in PATH. Remove the x86 SDK unless you really need it.
  • Running dotnet run in the wrong folder. It needs a project in the current folder. Use cd to move into the folder that contains the .csproj file.

Key points

  • Developers install the .NET SDK, which includes the compiler, the dotnet tool and all runtimes.
  • Install .NET 10 with the official installer, winget install Microsoft.DotNet.SDK.10, or apt-get install dotnet-sdk-10.0 on Ubuntu.
  • dotnet --version, dotnet --list-sdks and dotnet --info show what is installed.
  • VS Code with the C# Dev Kit, Visual Studio 2026 and Rider are all good editors.
  • dotnet new console -o Name creates a project and dotnet run builds and runs it.

Exercise

Install the .NET 10 SDK and check it with dotnet --version. Then create a console project called PuneCafe, run it once, and finally list every SDK installed on your computer. Write down the commands you used, in order.

Show solution
Terminal
dotnet --version
dotnet new console -o PuneCafe
cd PuneCafe
dotnet run
dotnet --list-sdks

dotnet --version should print a number starting with 10.0, and dotnet run prints Hello, World! because the template's Program.cs contains that line. dotnet --list-sdks works from any folder.

Quick Quiz

1. Which package should a developer install?

2. Which command shows all installed SDK versions?

3. You installed .NET but the terminal says dotnet is not recognised. What should you try first?

4. What does dotnet new console -o HelloRohtak do?

Learn C# with a mentor

Free lessons get you started. Our Programming & Software Development training adds real projects and code reviews from working developers.

  • Project-based learning
  • Mentor code reviews
  • Free counselling call