Development Tools
Setting up .NET means installing the tools you need to build apps. Here is a simple guide to setting up the three main tools: the .NET CLI, Visual Studio, and Visual Studio Code.
The .NET SDK & CLI (The Core Engine)
Think of the .NET SDK as the engine under the hood. You must install this first. It includes the .NET CLI, which lets you control your projects using text commands.
How to Install: Go to the official .NET website, download the installer for your computer (Windows, Mac, or Linux), and run it.
How to Check It: Open your computer's terminal (Command Prompt or PowerShell) and type dotnet --version. If a version number appears, it works!
Useful Commands:
- dotnet new console -n MyApp — Creates a new, ready-to-go application folder named "MyApp".
- dotnet run — Starts and runs your app.
Visual Studio (The Full Power Tool for Windows)
Visual Studio is a massive, all-in-one software box. It has everything built-in, but it is heavy and only works fully on Windows.
How to Install: Download the Visual Studio Installer from Microsoft's website.
Important Step: During installation, it will ask you to choose "Workloads" (packages of features). Check the boxes for ASP.NET and web development and .NET desktop development. This ensures you have the right tools without wasting computer space.
Best For: Large business applications and developers who prefer clicking buttons over typing commands.
Visual Studio Code (The Lightweight Editor)
Visual Studio Code (VS Code) is a very fast, lightweight text editor. It works on Windows, Mac, and Linux. It starts simple, but you add "extensions" (plugins) to make it powerful.
- How to Install: Download it from the VS Code website and install it.
- Make it work with .NET: Open VS Code, click the Extensions icon on the left menu (it looks like four squares), and search for and install the C# Dev Kit. This plugin teaches VS Code how to read, run, and fix .NET code.
- How to Install: Open an empty folder in VS Code. Press Ctrl+Shift+P (or Cmd+Shift+P on Mac) to open the search bar at the top, type .NET: New Project, and choose your project type.
Which tool should you use?
Use Visual Studio if you are on Windows and want an all-in-one tool where everything is already set up.
Use VS Code if you want a fast, lightweight tool, or if you are using a Mac or Linux computer.
class Program
{
static void Main()
{
Console.WriteLine("Hello, World!");
}
}
💻 Interactive Code Editor
C# (.NET)Feel free to change the message string inside the quotes and run it to watch your results update instantly.
Terminal Output Console:
Click "Run Code" above to check execution output logs...