I read Running a self-contained ASP.NET Core application on Ubuntu and publish setting like below
and upload to ubuntu without do.net sdk/runtime, and command app_name
but ubuntu show app_name: command not found
and upload to ubuntu without do.net sdk/runtime, and command app_name but ubuntu show app_name: command not found
It means that do.net
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.
do.net --list-sdks
To check SDK Version List
do.net --list-runtimes
To check DotNet Runtime Version
do.net --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
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.