How to make .Net Core 2.x as default?

  .net-core, windows

I am on Windows 10. I have both .net core 2.1 and 5.0 installed on my machine. I can see them in path C:Program Filesdotnetsdk. Also both of them are present in the result of the following command:

dotnet --info

When running dotnet --version on the prompt I see version 5.0.401. I have some backward compatiblites, so I need to use .net core 2.1 only.

How can I make .net core 2.1 as default?


  • re-installing .net sdk 2.1 didn’t help

Source: Windows Questions