To check the .NET SDK version, run dotnet --version or dotnet --list-sdks in a terminal. To check the .NET runtime version, run dotnet --list-runtimes; dotnet --info shows everything in one report. Use this when you need to know what is installed on a laptop, a build agent or a server. This post explains what each command prints, how to tell the SDK from the runtime, how to read the version in C# code, and what to do when the output does not match what you expect. The same commands work on Windows, macOS and Linux.

Check the .NET SDK version: dotnet –version and dotnet –list-sdks
The SDK is what builds your projects (dotnet build, dotnet publish). To see the one in use for the current folder:
dotnet --version
To see every SDK installed on the machine:
dotnet --list-sdks
10.0.301 [/usr/local/share/dotnet/sdk]
10.0.401 [/usr/local/share/dotnet/sdk]
On that machine dotnet --version printed 10.0.401, the newest of the two. A global.json file can change that. I put a global.json that pins version 10.0.301 with "rollForward": "disable" in a folder, and dotnet --version run there printed 10.0.301 even though 10.0.401 was installed. If the two commands disagree, look for a global.json in the current or a parent folder (global.json overview (Microsoft Learn)).
Check the .NET runtime version: dotnet –list-runtimes
The runtime is what runs a compiled app. A server that only hosts apps needs a runtime, not an SDK.
dotnet --list-runtimes
Microsoft.AspNetCore.App 10.0.9 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 10.0.12 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 10.0.9 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 10.0.12 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Each line is a framework name, a version and an install folder. The names mean:
| Name | Used by |
|---|---|
| Microsoft.NETCore.App | Console apps, libraries and the base runtime |
| Microsoft.AspNetCore.App | Web apps and APIs |
| Microsoft.WindowsDesktop.App | WPF and Windows Forms, on Windows only |
An app needs the runtime for the major version it targets. A newer SDK can build an older target, but the app will not start if that major runtime is missing. SDK and runtime patch numbers are separate: in the output above, SDK 10.0.401 sits next to runtime 10.0.12. Compare the major and minor numbers, not the patch. The official walkthrough is How to check which .NET versions are installed (Microsoft Learn).
Check if .NET is installed: dotnet –info
Open a terminal (Command Prompt, PowerShell, Terminal or bash) and run:
dotnet --info
If .NET is installed you get a report with the SDK, the runtime host, the operating system and the list of installed runtimes. Here is the top of that report from a Mac with .NET SDK 10.0.401:
.NET SDK:
Version: 10.0.401
Commit: e34a38d2ae
Runtime Environment:
OS Name: Mac OS X
OS Platform: Darwin
RID: osx-arm64
Host:
Version: 10.0.12
Architecture: arm64
If the command is not found instead, no SDK or runtime is installed, or the install folder is not on PATH. See the troubleshooting section below. Note that since version 5 the product is called simply .NET; the old name .NET Core applies to versions 1.0 to 3.1, and the same commands cover both.
Check the version in C# code
Inside a running app you can read the runtime it is using. This reports the runtime only; code cannot tell you which SDKs are installed.
using System.Runtime.InteropServices;
Console.WriteLine($"Environment.Version: {Environment.Version}");
Console.WriteLine($"RuntimeInformation.FrameworkDescription: {RuntimeInformation.FrameworkDescription}");
Console.WriteLine($"RuntimeInformation.RuntimeIdentifier: {RuntimeInformation.RuntimeIdentifier}");
Console.WriteLine($"RuntimeInformation.ProcessArchitecture: {RuntimeInformation.ProcessArchitecture}");
Output on the same Mac:
Environment.Version: 10.0.12
RuntimeInformation.FrameworkDescription: .NET 10.0.12
RuntimeInformation.RuntimeIdentifier: osx-arm64
RuntimeInformation.ProcessArchitecture: Arm64
To trace which package pulls in which version of a dependency, see transitive dependencies in .NET Core. FrameworkDescription is the readable one to log at startup. For other ways to find language and framework versions, see how to check the C# and .NET version.
Is your .NET version still supported?
The support policy page (.NET support policy) lists .NET 10 as LTS, supported until November 14, 2028, and .NET 11, released on November 10, 2026, as STS, supported until November 14, 2028. It lists .NET 8 and .NET 9 as out of support since November 10, 2026. If your commands show only 8.x or 9.x, plan an upgrade. Check the policy page again before relying on these dates.
Troubleshooting
- ‘dotnet’ is not recognized: nothing is installed, or the folder is not on PATH (for example
C:\Program Files\dotneton Windows). Install .NET or fix PATH, then open a new terminal. - Different results on the same machine: x86 and x64 installs are separate. The dotnet executable that comes first on PATH decides what you see.
- Version differs from –list-sdks: a global.json is pinning the SDK for that folder (tested above).
- .NET Framework is missing from the list: these commands list .NET Core and .NET 5 and later only. .NET Framework is tracked separately, for example in the Windows registry.
- App will not start, ‘framework not found’: the runtime for the app’s target major version is not installed. Compare
dotnet --list-runtimeswith the target in the project file. - Publishing fails with NETSDK1099 or similar: that is a project setting problem, not a missing install. See NETSDK1099: publishing to a single file is only supported for executable.
What was tested and what was not
- Run on macOS (Apple silicon) with .NET SDK 10.0.401:
dotnet --version,--list-sdks,--list-runtimes,--info, the global.json pin, and the C# sample. All the output above is copied from those runs. - Not tested: Windows and Linux (the Windows paths are from Microsoft’s documentation), x86 versus x64 installs, and the troubleshooting cases other than the global.json pin. The support dates come from the policy page at the time of writing.
Summary
dotnet --list-sdksanddotnet --list-runtimesshow what is installed;dotnet --infoshows both plus the host and OS.dotnet --versionshows only the SDK selected for the current folder, which a global.json can change.- In code,
RuntimeInformation.FrameworkDescriptionshows the runtime the app is running on, not the installed SDKs.
Found this useful?
Bookmark this page and share it with your team. Get new .NET, cloud and database tutorials in your inbox.
Check .NET version FAQ
How do I check the .NET SDK version?
Run dotnet –version to see the SDK selected for the current folder, or dotnet –list-sdks to list every installed SDK. If they disagree, a global.json file in the folder or a parent is pinning the SDK.
How do I check the .NET runtime version (dotnet list runtimes)?
Run dotnet –list-runtimes. It lists every installed runtime with its framework name, version and folder. Inside an app, RuntimeInformation.FrameworkDescription shows the runtime the app is running on.
How do I check the .NET Core version in cmd?
Open Command Prompt and run dotnet –info for the full report, or dotnet –list-sdks and dotnet –list-runtimes for the lists. The commands are the same for .NET Core and for .NET 5 and later, but they do not list .NET Framework.
If your output looked different from the examples, paste it in the comments and we will help you read it.
