受欢迎的博客标签

How to Upgrade a Real World ASP.NET Core 5.x web application on Ubuntu 18.04 step by step

Published

.NET SDK Installer

https://dotnet.microsoft.com/download/dotnet

 

step 1:   Install the latest SDK&Install the runtime on Ubuntu 18.04

detail:https://docs.microsoft.com/en-us/dotnet/core/install/linux-ubuntu#1804-

sudo apt-get update; \
  sudo apt-get install -y apt-transport-https && \
  sudo apt-get update && \
  sudo apt-get install -y dotnet-sdk-5.0
sudo apt-get update; \
  sudo apt-get install -y apt-transport-https && \
  sudo apt-get update && \
  sudo apt-get install -y aspnetcore-runtime-5.0

step 2:Check everything installed correctly

dotnet --info

output

.NET SDK (reflecting any global.json):
 Version:   5.0.102
 Commit:    71365b4d42

Runtime Environment:
 OS Name:     ubuntu
 OS Version:  18.04
 OS Platform: Linux
 RID:         ubuntu.18.04-x64
 Base Path:   /usr/share/dotnet/sdk/5.0.102/

Host (useful for support):
  Version: 5.0.2
  Commit:  cb5f173b96

.NET SDKs installed:
  5.0.100 [/usr/share/dotnet/sdk]
  5.0.102 [/usr/share/dotnet/sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 5.0.2 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 5.0.2 [/usr/share/dotnet/shared/Microsoft.NETCore.App]

To install additional .NET runtimes or SDKs:
  https://aka.ms/dotnet-download

step 3:change sdk version in gloabl.json

.NET SDKs installed:
  5.0.100 [/usr/share/dotnet/sdk]
  5.0.102 [/usr/share/dotnet/sdk]

change .NET SDKs version installed on on Ubuntu 18.04 from 5.0.101 to 5.0.102

old 

{
  "sdk": {
    "version": "5.0.101"
  }
}

new

{
  "sdk": {
    "version": "5.0.102"
  }
}