I have .NET 6 and .NET 7 on my Ubuntu system. When I try to execute a test in Rider it says dotnet 6 isn't installed. But it is. If I run dotnet --list-runtimes
it shows only .NET 7.
Console output:
Reading state information... Done
aspnetcore-runtime-6.0 is already the newest version (6.0.110-0ubuntu1~22.04.1).
0 upgraded, 0 newly installed, 0 to remove and 10 not upgraded.
aaronlord@system76-pc:~/Downloads$ dotnet --list-runtimes
Microsoft.AspNetCore.App 7.0.0 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 7.0.0 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
aaronlord@system76-pc:~/Downloads$ dotnet --list-sdks
6.0.403 [/usr/share/dotnet/sdk]
7.0.100 [/usr/share/dotnet/sdk]
dotnet
binary is actually a symlink that points to either .NET 6 or .NET 7 installation. Similarly togcc
installation: you can have different versions of gcc, but thegcc
binary will point to only one of them. You can change which version it's pointing to withupdate-alternatives
command – Hi-Angel Nov 21 '22 at 21:28