Tutorials / C# for Beginners / Installing the .NET 10 SDK and checking it works

Installing the .NET 10 SDK and checking it works

9 min read bash
Course contents (16 lessons)
  1. Getting started
  2. Installing the .NET 10 SDK and checking it works
  3. Your first console app and top-level statements
  4. The building blocks
  5. Variables and basic types
  6. Working with strings and interpolation
  7. Reading input and writing output
  8. Making decisions and repeating work
  9. Conditionals and switch expressions
  10. Loops: for, while, do and foreach
  11. Collections and methods
  12. Arrays and List of T
  13. Writing your own methods
  14. Objects and classes
  15. Classes and objects
  16. Properties, encapsulation and object initialisers
  17. Handling null safely
  18. Errors and files
  19. Exceptions: try, catch, finally and throw
  20. Reading and writing files
  21. Final project: expense tracker
  22. Expense tracker, part 1: planning, model and storage
  23. Expense tracker, part 2: the menu and summaries

What you are installing

C# is the language. .NET is the platform that runs it. To write and run C# on your own machine you need the .NET SDK. SDK means software development kit. It contains the compiler, the runtime that executes your programs, and the dotnet command-line tool that ties everything together.

This course uses .NET 10. It is a long-term support release, which means Microsoft supports it for three years. That matters for a learner. The code you write now will still be supported when you finish the course and start real projects.

Installing the SDK

Go to the official download page at dotnet.microsoft.com/download and pick the .NET 10 SDK, not just the runtime. The runtime can run programs but cannot build them.

Windows

Download the installer and run it. If you like the command line, this works too:

winget install Microsoft.DotNet.SDK.10

macOS

Download the installer package for your chip (Apple silicon or Intel) and run it. If you use Homebrew, brew install --cask dotnet-sdk installs the latest SDK.

Linux

Most distributions have .NET in their package manager. On Ubuntu the package is called dotnet-sdk-10.0. Package names change between distributions and versions, so check the official install page for your distribution if the name is not found.

Checking the install

Close any terminal that was already open. Open a new one so it sees the updated PATH. Then run this:

dotnet --version
dotnet --list-sdks

The first command prints the version of the SDK you are using. It should start with 10.. The second lists every SDK installed on the machine. It is normal to have more than one. If you have a newer SDK installed as well, that is fine for this course. The code we write works on .NET 10 and later.

If you see "dotnet is not recognized" or "command not found", the install did not finish or the terminal is old. Close it, open a new one, and try again. On Windows, restarting the machine fixes stubborn PATH problems.

Choosing an editor

You can write C# in any text editor, but a proper editor saves hours. There are three common choices.

  • Visual Studio Code is free and light. Install the C# Dev Kit extension from the marketplace.
  • Visual Studio Community is free for individuals and learners. It is heavier but has the best debugger on Windows.
  • JetBrains Rider is a paid editor with a free tier for non-commercial use. Many professionals like it.

I use all three at different times. For this course, pick VS Code if you are unsure. It runs on every operating system, so the instructions look the same for everyone.

A terminal is part of the job

Many beginners avoid the terminal. Please do not. Throughout this course we create projects and run them with short commands. Learn four things now: how to open a terminal in a folder, how to change folder with cd, how to list files with dir (Windows) or ls (macOS and Linux), and how to go up one folder with cd ...

Make a folder for your practice work. Something like CSharpCourse in your Documents folder is fine. Every project from this course will live inside it.

Common mistakes

  • Installing only the runtime. If dotnet new says no templates are found or dotnet build fails, you likely have the runtime only. Install the SDK.
  • Using an old terminal. The PATH is read when the terminal starts. A terminal opened before the install will not find the command.
  • Mixing up .NET Framework and .NET. .NET Framework is the old Windows-only version (4.8 and below). Modern .NET (5 and later) is the one we use. Many old tutorials online are for the old one, and their code may not match what you see here.

Try it yourself

  1. Install the .NET 10 SDK and run dotnet --version.
  2. Run dotnet --list-sdks and find your version in the list.
  3. Run dotnet --info and look for the line that names your operating system. This output is what people ask for when you report a problem online, so it is good to know where it is.
  4. Create the practice folder and open it in your editor.

In the next lesson you will create your first project and run a real C# program.

bash
dotnet --version
dotnet --list-sdks

This course is free to read. Create a free account to enrol, save your progress and pick up where you left off.

Sign up free I already have an account