本文主要介绍在win7或win10系统上,没有安装.Net Core sdk的情况下,判断.Net Core runtime某个版本是否安装的方法。以及判断.Net Core SDK安装版本。

1、判断.Net Core runtime是否安装以及安装的版本

下面命令在Powershell中执行:

(dir (Get-Command dotnet).Path.Replace('dotnet.exe', 'shared\Microsoft.NETCore.App')).Name

2、判断.Net Core sdk是否安装以及安装的版本

下面命令在Powershell中执行:

(dir (Get-Command dotnet).Path.Replace('dotnet.exe', 'sdk')).Name

推荐文档