简体   繁体   English

asp.net core 3.1自带单文件+linux-x64,ubuntu 20.04无法运行app

[英]asp.net core 3.1 self-contained single file + linux-x64, ubuntu 20.04 can't run app

I read Running a self-contained ASP.NET Core application on Ubuntu and publish setting like below我阅读了 Running a self-contained ASP.NET Core application on Ubuntu并发布如下设置

在此处输入图像描述

published file发布的文件在此处输入图像描述

and upload to ubuntu without do.net sdk/runtime, and command app_name but ubuntu show app_name: command not found并上传到 ubuntu 没有 do.net sdk/runtime,和命令app_name但 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并上传到 ubuntu 没有 do.net sdk/runtime,和命令 app_name 但 ubuntu show app_name: command not found

It means that do.net command has not been recognized by Ubuntu 22.04 (LTS) .这意味着do.net命令尚未被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 .在这种情况下,如果您想开发.NET apps ,请Install the SDK (which includes the runtime)或者,如果您只需要运行应用程序, 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.如果您要安装运行时,Microsoft 建议安装 ASP.NET 核心运行时,因为它包括 .NET 和 ASP.NET 核心运行时。 You can see here你可以here看到

How would you check whether install succeeded:你将如何检查是否安装成功:

You can see which versions of the .NET SDK are currently installed with a terminal.可以用终端查看.NET SDK当前安装了哪些版本。 Open a terminal and run the following command.打开终端并运行以下命令。

do.net --list-sdks To check SDK Version List do.net --list-sdks查看SDK版本列表

do.net --list-runtimes To check DotNet Runtime Version do.net --list-runtimes检查 DotNet 运行时版本

do.net --version To check Lastest Installed Version do.net --version检查最新安装的版本

If you still encounter command not found means your installation didn't get succeeded.如果还是遇到command not found ,说明你的安装没有成功。 For more details please check our official document here有关详细信息,请official document here

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 独立的ASP.Net Core应用程序无法在Mac上运行 - self-contained ASP.Net Core app doesn't run on Mac 发布到 Linux .NET Core 上的独立文件 - Publishing to a self-contained file on Linux .NET Core .NET 6.0 控制台应用程序作为独立的单文件可执行文件 - .NET 6.0 Console app as a self-contained single file executable .net 核心 3.1 自包含,服务要求安装运行时 - .net core 3.1 Self-Contained, service asks for Runtime to be installed 有没有办法运行 ASP.NET 1.1 web 应用程序完全独立(没有 IIS 或 Z97708840A0101CBB037)服务器? - Is there a way to run an ASP.NET 1.1 web application completely self-contained (without IIS or SQL Server)? 我如何构建一个.Net应用程序,它作为一个独立的文件/实体(没有安装程序)分发? - How can I build a .Net application which is distributed as a single and self-contained file/entity (no installer)? 将 .NET Core 3.1 Lambda 发布到 AWS 时,我应该使用“--self-contained true”吗? - Should I use “--self-contained true” when publishing a .NET Core 3.1 Lambda to AWS? 发布用于Linux体系结构的.NET Core C#自包含应用程序 - Publishing .NET Core C# self-contained application for linux architecture 无法构建/发布 OS X 自包含的 .NET Core 可执行文件 - Unable to build / publish OS X self-contained .NET Core executable 如何在 MacOS 上运行 .NET Core 3.1 单文件应用程序? - How to run a .NET Core 3.1 single-file app on MacOS?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM