IT Nota

  • Home
  • How To
  • .NET
  • WordPress
  • Contact
You are here: Home / How To / How to Check Installed .NET Core Version

How to Check Installed .NET Core Version

This is one way to determine what version of .NET Core is installed on your machine (or if it’s not installed):

  1. Launch Windows PowerShell.
  2. Runtime
    (dir (Get-Command dotnet).Path.Replace('dotnet.exe', 'shared\Microsoft.NETCore.App')).Name
    
  3. SDK
    (dir (Get-Command dotnet).Path.Replace('dotnet.exe', 'sdk')).Name
    

In the following example, you can see that .NET Core 2.1.2 Runtime is installed, but the SDK is not installed with the following error message:

dir : Cannot find path 'C:\Program Files\dotnet\sdk' because it does not exist.
At line:1 char:2
+ (dir (Get-Command dotnet).Path.Replace('dotnet.exe', 'sdk')).Name
+  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (C:\Program Files\dotnet\sdk:String) [Get-ChildItem], ItemNotFoundExcept
   ion
    + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetChildItemCommand
 
PS C:\Windows\system32>

PowerShell query for installed .NET Core version

Otherwise, it will look more like the next screenshot:

PowerShell query for installed .NET Core version for both Runtime and SDK

Another Way

There’s another way to accomplish the same thing with a much simpler command and this works on either Windows or macOS.

  1. Depending on your operating system, launch either Windows PowerShell or Terminal.
  2. Runtime
    dotnet --list-runtimes
    
  3. SDK
    dotnet --list-sdks
    
Installed .NET Core versions for both Runtime and SDK from PowerShell

Windows PowerShell

 

Installed .NET Core versions for both Runtime and SDK from macOS Terminal

macOS Terminal

 

When you see more than one entries, that means you have several versions installed and actually that’s the advantage of using .NET Core, you can have different versions installed side-by-side. The latest version is the last version number at the bottom of the result.

If you need a way to check the installed version of .NET Framework instead, check the link here.

Further Reading

How to Check Installed .NET Framework Version
How to determine if .NET Core is installed
How to: Determine which .NET Framework versions are installed
How to: Determine which .NET Framework security updates and hotfixes are installed
How to Remove .NET Runtime and SDK on Mac
How to Use System.Configuration.ConfigurationManager on .NET CORE

January 30, 2019 Filed Under: How To Tagged With: .NET, .NET Core, Microsoft, PowerShell, Windows

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Buy me a coffee Support this site
Buy Me a Coffee?

Categories

  • .NET
  • Coding
  • Cybersecurity
  • Database
  • How To
  • Internet
  • Multimedia
  • Photography
  • Programming
  • Resources
  • Review
  • Tips and Tricks
  • Use Case
  • WordPress
  • Writing

Recent Posts

  • How to Check Installed .NET Framework Version
  • How to Remove .NET Runtime and SDK on Mac
  • How to Solve Intermittent 403 Error in IIS
  • How to Show Hidden Folders and Files in Mac Finder
  • How to Solve MS Office VBA Compile Error UserAuthentication

Recent Posts

  • How to Check Installed .NET Framework Version
  • How to Remove .NET Runtime and SDK on Mac
  • How to Solve Intermittent 403 Error in IIS
  • How to Show Hidden Folders and Files in Mac Finder
  • How to Solve MS Office VBA Compile Error UserAuthentication
  • RSS

Tags

.NET Access AdSense ASP.NET Cdonts Dll Classic ASP Code Editor ETL FSharp Genesis Framework Git Google HP Asset Manager HTML HTML5 Hugo IIS Information Security Internet Internet Information Services iOS JAMStack Linux macOS Microsoft Microsoft SQL Server MVC PHP Python Simple Mail Transfer Protocol Smtp Server Social Media SQL SQL Server SSIS SSMS SSRS Sublime Text Visual Studio Visual Studio Code VPN Windows Windows 8 Windows 10 Windows Server

Copyright © 2011-2022 IT Nota. All rights reserved. Terms of Use | Privacy Policy | Disclosure