Figuring out what version of .Net is on your computer is not so easy to answer. Do you have the new .Net or the .Net Framework? Let’s look at ways to answer this questions.
.Net (Core)
For .Net you can this command to get a list of all installed SDKs on your machine:
1 2 3 4 5 6 |
dotnet --list-sdks 5.0.100 [C:\Program Files\dotnet\sdk] 5.0.408 [C:\Program Files\dotnet\sdk] 6.0.201 [C:\Program Files\dotnet\sdk] 6.0.300 [C:\Program Files\dotnet\sdk] |
This list is empty if you only have a .Net runtime installed. To check that, you can run this command:
1 2 3 4 5 6 |
dotnet --list-runtimes Microsoft.AspNetCore.App 3.1.17 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 5.0.8 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.NETCore.App 3.1.17 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 5.0.8 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] |
.Net Framework
For .Net Framework 4.5 and newer you must open the Registry Editor and go to the path HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full to see the installed release:
From the release number you need to map to the .Net Framework version. Microsoft has all release numbers listed on the site .NET Framework versions and dependencies, including the different operating systems and patch levels. (The release value 528049 stands for .Net Framework 4.8 on Windows Server 2019)