.NET › .NET CLI, SDK & Project Structure (csproj)
What is the .NET SDK, and how does it differ from the .NET Runtime?
BeginnerAnswer
The .NET SDK includes everything needed to build, run, and publish .NET applications: the compiler (Roslyn for C#), the dotnet CLI, MSBuild, and the runtime. The .NET Runtime alone only includes what's needed to execute already-built applications (CLR, base libraries) without build tools. Developer machines need the SDK; production servers running pre-built apps only need the runtime.
# Check installed SDKs and runtimes
dotnet --list-sdks
dotnet --list-runtimes
dotnet --versionReal-world example A CI build agent installs only the SDK to compile and publish an app, while the production Docker image uses a lightweight aspnet:runtime base image without the full SDK to reduce image size.