내 Ubuntu 시스템에는 .NET 6 및 .NET 7이 있습니다. Rider에서 테스트를 실행하려고 하면 dotnet 6이 설치되지 않았다는 메시지가 나타납니다. 하지만 그것은. 실행하면 dotnet --list-runtimes
.NET 7만 표시됩니다.
콘솔 출력:
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]
답변1
1단계: 제거https://askubuntu.com/a/1386715/231561
2단계:references.d에서 props 설정https://stackoverflow.com/a/73899341/16454
3단계: 명시적인 값을 사용하여 설치https://github.com/dotnet/sdk/issues/27082#issuecomment-1211181940
나는 사용했다
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