Labs ICT
โญ Pro Login

Setting Up Your Environment

Before we start writing any code, we need to get your computer ready. Do not worry, this is going to be quick and painless. I promise.

The first thing you need is the .NET Software Development Kit (SDK). This is basically the whole package โ€” the compiler, the runtime, and all the tools you need to build .NET applications.

Installing the .NET SDK

Head over to dotnet.microsoft.com and download the latest version of the .NET SDK. It will automatically detect your operating system and give you the right installer.

For Windows users, just run the installer and follow the prompts. For macOS and Linux users, you can also use the package managers. Here are the commands:

Windows (PowerShell):

winget install Microsoft.DotNet.SDK.8

macOS:

brew install dotnet

Ubuntu/Debian:

sudo apt-get install -y dotnet-sdk-8.0

Choosing Your Code Editor

You can write C# code in any text editor, but trust me, you want a proper code editor. Here are your best options:

  • Visual Studio โ€” the full IDE. It is massive, has everything built in. Great for Windows developers.
  • Visual Studio Code โ€” lightweight, cross-platform, and has excellent C# support with extensions.
  • JetBrains Rider โ€” fast, modern, and has amazing .NET support. It is paid but worth it.

If you are just starting out, I recommend Visual Studio Code. It is free, lightweight, and will do everything you need for this tutorial. Install the "C# Dev Kit" extension from Microsoft and you are good to go.

Verifying Your Installation

Open a terminal or command prompt and type the following:

dotnet --version

If you see a version number like 8.0.xxx, you are all set. If not, go back and check your installation.

You can also run this command to see all the templates available:

dotnet new list

This will show you all the different types of projects you can create โ€” console apps, web APIs, class libraries, and more. We will be using the console app template in the next lesson.

๐Ÿงช Quick Quiz

What command checks your .NET SDK version?