Update .NET Core in Linux

To update, type the commands below at the command line:

sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-ubuntu-xenial-prod xenial main" > /etc/apt/sources.list.d/dotnetdev.list'

Type update command:

sudo apt-get update

and then, type the following to install the latest version:

sudo apt-get install dotnet-sdk-2.1.4

To test the installation, type dotnet –version that should display the version number currently installed.

To test a complete installation including the framework, create a simple console application by typing: dotnet new console -o testapp This creates a folder named testapp and the console app. Change to the folder testapp, and then type: dotnet run, that should display a text “Hello, World”.

Further for an ASP.NET core web app to test, type:

dotnet new razor -o aspnetapp

and then browse to http://localhost:5000 for the result

You’re ready to go from there…!

my signature
February 23, 2018