Home > database >  asp.net core 3.1 self-contained single file linux-x64, ubuntu 20.04 can't run app
asp.net core 3.1 self-contained single file linux-x64, ubuntu 20.04 can't run app

Time:10-08

I read enter image description here

published file enter image description here

and upload to ubuntu without dotnet sdk/runtime, and command app_name but ubuntu show app_name: command not found

enter image description here

CodePudding user response:

and upload to ubuntu without dotnet sdk/runtime, and command app_name but ubuntu show app_name: command not found

It means that dotnet command has not been recognized by Ubuntu 22.04 (LTS). In this scenario please Install the SDK (which includes the runtime) if you want to develop .NET apps Or, if you only need to run apps, install the Runtime.

If you're installing the Runtime, Microsoft's suggestion is to install the ASP.NET Core Runtime as it includes both .NET and ASP.NET Core runtimes. You can see here

How would you check whether install succeeded:

You can see which versions of the .NET SDK are currently installed with a terminal. Open a terminal and run the following command.

dotnet --list-sdks To check SDK Version List

dotnet --list-runtimes To check DotNet Runtime Version

dotnet --version To check Lastest Installed Version

If you still encounter command not found means your installation didn't get succeeded. For more details please check our official document here

  • Related