| Component | Link | |-----------|------| | .NET SDK (C# compiler) | https://dotnet.microsoft.com/download | | Visual Studio 2022 (IDE + compiler) | https://visualstudio.microsoft.com/downloads | | Visual Studio Code (lightweight editor) | https://code.visualstudio.com |
Open your Windows Terminal (or Command Prompt) and type:
This creates:
Yes. The C# compiler (Roslyn), the .NET runtime, and the Visual Studio Community edition are all free to use.
if you are a minimalist who wants to learn the "under the hood" mechanics of compiling code via the command line. Summary Checklist for Windows 11 OS: Windows 11 (64-bit). Space: 1GB for SDK / 20GB+ for Visual Studio. c# compiler download for windows 11
If you just want the compiler and tools without a heavy interface, download the SDK directly from Microsoft. Visit the official .NET Download page .
This produces Hello.exe .
That’s it. You can now compile code using the command line without ever opening an IDE.
bin\Debug\net8.0\HelloCSharp.exe