1

I don't really understand what is the difference between the dotnet sdk version and the TargetFramework version specified in my csproj file.

For example, my current project is using <TargetFramework>netcoreapp2.1</TargetFramework> version, but dotnet --version command returns 2.2.100. So the major version is the same, but the minor differs by 1.

Is it backwards compatible and netcoreapp2.1 apps can run on newer versions of dotnet sdk or something completely different?

dotnet --info:

.NET Core SDK (reflecting any global.json):
Version:   2.2.100
Commit:    b9f2fa0ca8

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

Host (useful for support):
  Version: 2.2.0
  Commit:  1249f08fed

.NET Core SDKs installed:
  2.2.100 [C:\Program Files\dotnet\sdk]

.NET Core runtimes installed:
  Microsoft.AspNetCore.All 2.2.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.App 2.2.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 2.2.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]

To install additional .NET Core runtimes or SDKs:
  https://aka.ms/dotnet-download
eddyP23
  • 4,745
  • 4
  • 29
  • 63
  • Can you also show what `dotnet --info` says on your machine? – omajid Dec 17 '18 at 17:27
  • @omajid updated the question – eddyP23 Dec 17 '18 at 17:39
  • @HansPassant, could you please elaborate on what is the difference between the two and how they are meant to work together? – eddyP23 Dec 17 '18 at 18:19
  • Possible duplicate of [What's the difference between SDK and Runtime in .NET Core?](https://stackoverflow.com/questions/47733014/whats-the-difference-between-sdk-and-runtime-in-net-core) – Lex Li Dec 17 '18 at 18:22

0 Answers0