如何确定是否已安装.NET Core [英] How to determine if .NET Core is installed

查看:430
本文介绍了如何确定是否已安装.NET Core的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道对于.NET的较早版本,您可以通过以下操作来确定是否安装了给定版本

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  

是否有官方的方法确定是否安装了.NET Core

Is there an official method of determining if .NET Core is installed?

(我不是说SDK,我要检查没有SDK的服务器,确定是否已安装DotNetCore.1.0.0-WindowsHosting.exe)

(And I don't mean the SDK, I want to check a server without the SDK, to determine if it has DotNetCore.1.0.0-WindowsHosting.exe installed on it)

我可以看到

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NET Cross-Platform Runtime Environment\.NET Framework 4.6\Win\v1-rc1 

在Windows 7机器上的版本号为1.0.11123.0,但是在Windows 10机器上看不到相同的东西。

with Version# of 1.0.11123.0 on my windows 7 machine, but I don't see the same stuff on my Windows 10 machine.

推荐答案

使用 Powershell

运行时间:

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

SDK:

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

这篇关于如何确定是否已安装.NET Core的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆