One knows how to check if the .net core SDK is installed or not (you need dotnet --version or where dotnet). How about .net core runtime as well as the aspnet core runtime?
PS: since in production we don't need the .net Core SDK
dotnet --info will show the version of the SDK (if installed), the names and versions of all the runtimes that are installed, including the .NET Core runtime and ASP.NET Core runtime.
$ dotnet --info
.NET Core SDK (reflecting any global.json):
Version: 2.1.301
Commit: 59524873d6
Runtime Environment:
OS Name: fedora
OS Version: 28
OS Platform: Linux
RID: fedora.28-x64
Base Path: /usr/lib64/dotnet/sdk/2.1.301/
Host (useful for support):
Version: 2.1.1
Commit: N/A
.NET Core SDKs installed:
2.1.202 [/usr/lib64/dotnet/sdk]
2.1.301 [/usr/lib64/dotnet/sdk]
.NET Core runtimes installed:
Microsoft.NETCore.App 2.0.9 [/usr/lib64/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.1 [/usr/lib64/dotnet/shared/Microsoft.NETCore.App]
To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download
If you only care about the runtime (.NET Core and ASP.NET Core) versions, you can use dotnet --list-runtimes. This requires a recent-enough version of .NET Core:
$ dotnet --list-runtimes
Microsoft.NETCore.App 2.0.9 [/usr/lib64/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.1 [/usr/lib64/dotnet/shared/Microsoft.NETCore.App]
I don't have the ASP.NET Core runtime packages installed, so it only shows me the .NET Core runtime.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With