DriesKn
DriesKn

Reputation: 21

What is the meaning of 'Host (useful for support)' in output of 'dotnet --info'

Output from dotnet --info:

.NET Core SDK (reflecting any global.json):
 Version:   3.1.416
 Commit:    8d3765c609

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.19044
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\3.1.416\

Host (useful for support):
  Version: 5.0.13
  Commit:  b3afe99225

.NET SDKs installed:
  3.1.416 [C:\Program Files\dotnet\sdk]
  5.0.404 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 3.1.22 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 5.0.13 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 3.1.22 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 5.0.13 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.WindowsDesktop.App 3.1.22 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 5.0.13 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

To install additional .NET runtimes or SDKs:
  https://aka.ms/dotnet-download

What does 'Host (useful for support) Version 5.0.13' mean here? I have a global.json to specify that I want to use 3.1.416:

global.json:

{
    "sdk": {
        "version": "3.1.416",
        "rollForward": "disable"
    }
}

But this 'Host (useful for support)' seems to indicate that I am using 5.0.13 after all.

Upvotes: 1

Views: 1017

Answers (1)

Lex Li
Lex Li

Reputation: 63133

So, you already knew that on a single machine multiple .NET Core SDK can be installed, like 3.1 and 5.0 on yours.

They both install to a common place C:\Program Files\dotnet\sdk, but there is a single dotnet.exe executable, which usually comes from the newest .NET Core SDK installation, which is the "Host" in your context.

When you set the desired SDK version in global.json, the 5.0 Host is smart enough to redirect all actual commands (like dotnet build) to utilize the 3.1 SDK bits.

Upvotes: 3

Related Questions