1

run the command "dotnet --list-sdk" in cmd window, the following msg shows,

5.0.404 [C:\Program Files\dotnet\sdk]
6.0.101 [C:\Program Files\dotnet\sdk]

which means .net core 3.1 sdk not installed.

but indeed I can create and make .net core 3.1 projects using VS2019, even using VSCode. Why .net core 3.1 apps can be created without 3.1 SDK?

lixiangc
  • 11
  • 2
  • https://stackoverflow.com/questions/65692530/why-dotnet-list-sdks-does-not-show-installed-sdks-on-windows-10 – Hans Passant Jan 11 '22 at 10:39
  • Thanks for your reply! @Hans Passant I figure it out after reading your link and searching more results. .NET 5 SDK is forwards compatibility with .NET Core 3.1 SDK, but .NET runtime not. I can create and build .NET Core 2.1 console app in VS2019 successfully because .NET 5 SDK intalled in my computer, but it fails when running the app because .NET Core 2.1 runtime not installed. – lixiangc Jan 13 '22 at 09:56

0 Answers0