.netubuntunugetubuntu-24.04dotnet-sdk

Downgrade dotnet 8 SDK on ubuntu 24.04


I'm using ubuntu 24.04 and was offered an upgrade to dotnet sdk 8.0.114. After the upgrade dotnet restore hangs on Determining projects to restore.... I removed every trace of dotnet then reinstalled, but have the same issue.

I want to downgrade to the previous version of the SDK, but the launchpad page shows that all versions other than the latest were "superceded", none can be installed. So for example, this fails:

sudo apt install dotnet-sdk-8.0=8.0.113-0ubuntu1~24.04.1

The only other sdk which can be installed is from a year ago (8.0.104-0ubuntu1) and I know the version I was using before the upgrade was newer than that.

How can I determine which was the previous version, and how can I install it?


Solution

  • I don't know how to install an older package using apt, but you can always manually install a version of dotnet from the tar archive. Go here and download the "binary" distribution you need (e.g. the 8.0.310 SDK for Linux/X64)

    Then do something like

    mkdir -p $HOME/dotnet && tar zxf dotnet-sdk-8.0.310-linux-x64.tar.gz -C $HOME/dotnet
    sudo ln -s $HOME/dotnet/dotnet /usr/bin/dotnet
    

    Note that 8.0.114 is not the latest version of the 8.0 branch. 8.0.407 is, which might have your problem resolved (I have never observed that issue, so I cannot tell).