How to determine if .NET Core is installed

前端 未结 16 1852
难免孤独
难免孤独 2020-12-07 06:53

I know that for older versions of .NET, you can determine if a given version is installed by following

https://support.microsoft.com/en-us/kb/318785  
         


        
16条回答
  •  不知归路
    2020-12-07 07:36

    I work primarily with Windows development machines and servers.

    I just wanted to point out (at least for NET.Core 2.0 and above) the only thing needed is to execute dotnet --info in a command prompt to get information about the latest version installed. If .NET Core is installed you will get some response.

    On my development machine (Windows 10) the result is as follows. SDK is 2.1.2 and runtime is 2.0.3.

    .NET Command Line Tools (2.1.2)
    
    Product Information:
     Version:            2.1.2
     Commit SHA-1 hash:  5695315371
    
    Runtime Environment:
     OS Name:     Windows
     OS Version:  10.0.15063
     OS Platform: Windows
     RID:         win10-x64
     Base Path:   C:\Program Files\dotnet\sdk\2.1.2\
    
    Microsoft .NET Core Shared Framework Host
    
      Version  : 2.0.3
      Build    : a9190d4a75f4a982ae4b4fa8d1a24526566c69df
    

    On one of my servers running Windows Server 2016 with Windows Server Hosting pack (no SDK) result is as follows. No SDK, runtime is 2.0.3.

    Microsoft .NET Core Shared Framework Host
    
    Version  : 2.0.3
    Build    : a9190d4a75f4a982ae4b4fa8d1a24526566c69df
    

    Cheers !

提交回复
热议问题