sudo apt remove dotnet-host
sudo apt remove netstandard-targeting-pack-2.1
sudo apt-get install -y dotnet-sdk-2.1
sudo apt-get install -y dotnet-sdk-3.1
- Create and
cd
into the directory to download the SDK inmkdir $HOME/dotnet_install && cd $HOME/dotnet_install
- Download the install script:
curl -H 'Cache-Control: no-cache' -L https://aka.ms/install-dotnet-preview -o install-dotnet-preview.sh # or "bypass" aka.ms download it directly from the blob storage curl -H 'Cache-Control: no-cache' -L https://dotnetcli.blob.core.windows.net/dotnet/release/install-preview/install-dotnet-preview.sh -o install-dotnet-preview.sh
- Install that preview version
sudo bash install-dotnet-preview.sh
To install previous preview, before executing the install-dotnet-preview.sh
, edit the file and change the following variables:
DEPS_BUILD
PREVIEW_NUMBER
For example, preview 5 would be:
DEPS_BUILD="20279.10"
PREVIEW_NUMBER="5"
While preview 6 is:
DEPS_BUILD="20305.6"
PREVIEW_NUMBER="6"
With the VS Code WSL extension, you can code .
from the $HOME/dotnet_install
directory in WSL to open VS Code.
Those values are available on the download page, and look at the Full version: Download .NET 5.0.