Tenho .NET 6 e .NET 7 no meu sistema Ubuntu. Quando tento executar um teste no Rider, diz que o dotnet 6 não está instalado. Mas isso é. Se eu executar, dotnet --list-runtimes
ele mostrará apenas o .NET 7.
Saída do console:
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]
Responder1
Etapa 1: desinstalarhttps://askubuntu.com/a/1386715/231561
Etapa 2: definir acessórios em preferências.dhttps://stackoverflow.com/a/73899341/16454
Etapa 3: instale com alguns valores explícitoshttps://github.com/dotnet/sdk/issues/27082#issuecomment-1211181940
eu usei
sudo apt install aspnetcore-runtime-6.0=6.0.11-1 dotnet-apphost-pack-6.0=6.0.11-1 dotnet-host=6.0.11-1 dotnet-hostfxr-6.0=6.0.11-1 dotnet-runtime-6.0=6.0.11-1 dotnet-sdk-6.0=6.0.400-1 dotnet-targeting-pack-6.0=6.0.11-1