我正在尝试使用此命令在我的服务器上安装 Dotnet 核心。
wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
sudo apt-get update
sudo apt-get install apt-transport-https
sudo apt-get update
sudo apt-get install dotnet-sdk-3.1
但“dotnet --version”的输出是
It was not possible to find any installed .NET Core SDKs
当我进入我的项目的根目录并使用“sudo dotnet build -c Release”时,输出是
It was not possible to find any installed .NET Core SDKs
Did you mean to run .NET Core SDK commands? Install a .NET Core SDK from:https://aka.ms/dotnet-download
有人有想法吗?
=========更新=========
我使用了 Docker,我的所有问题都解决了