Sample Header Ad - 728x90

Is it possible for runtime .NET Core 3.1 and 6.0 to coexist on an Ubuntu system

1 vote
1 answer
66 views
Is it possible for runtime .NET Core 3.1 and 6.0 to coexist on an Ubuntu system (for example, Ubuntu 22.04)? Let me explain, I have a computer where I need both runtimes, but either I install one or the other. I can't seem to get them to work together. The installation for version 3.1 is done like this:
wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.0g-2ubuntu4_amd64.deb 
sudo dpkg -i libssl1.1_1.1.0g-2ubuntu4_amd64.deb
wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb   
dpkg -i packages-microsoft-prod.deb  
apt update  
apt install apt-transport-https dotnet-runtime-3.1 -y
And for version 6.0, I use the following steps:
wget https://packages.microsoft.com/config/ubuntu/22.04/packages-microsoft-prod.deb  -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
rm packages-microsoft-prod.deb
sudo apt-get update
sudo apt install aspnetcore-runtime-6.0
However, when I run dotnet --list-runtimes, I only see version 3.1. If I only perform the installation of 6.0, only that one is displayed. But never both.
Asked by Francisco de Javier (1311 rep)
Aug 31, 2023, 09:27 AM
Last activity: Mar 8, 2024, 06:49 AM