Skip to content

Latest commit

 

History

History
53 lines (41 loc) · 1.61 KB

dotnet-5-ubuntu20.04.md

File metadata and controls

53 lines (41 loc) · 1.61 KB

dotnet 5 on ubuntu 20.04

until it will supported through deb to make it work snap install could used, but I needed to have 3.1 and 5.0 sdks without to switch beetween, so follow is my approach:

export DOTNET_ROOT=/opt/dotnet
# use without localization ( only invariant ) until release of 5.0
export DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=true
export PATH=$PATH:$DOTNET_ROOT
  • test with
dotnet new console -n test
cd test
dotnet build
dotnet run
  • sdks available
devel0@tuf:~$ dotnet --list-sdks
3.1.202 [/opt/dotnet/sdk]
5.0.100-preview.3.20216.6 [/opt/dotnet/sdk]
  • to enable vscode omnisharp to work correctly I needed to apply follow omnisharp.json file in the solution or alternatively globally placing into ~/.omnisharp/omnisharp.json
{
    "MsBuild": {
        "UseLegacySdkResolver": true
    }
}
  • optional: in the solution folder initialize global json and change in case ( see dotnet --list-sdks for specific names )
dotnet new globaljson

test it opening previous test solution then set a breakpoint and hit F5