简体   繁体   English

Elastic Beanstalk 无法在 Linux 上部署我的 ASP Net Core 应用程序

[英]Elastic Beanstalk Can't Deploy my ASP Net Core application on Linux

I've got a basic ASP Net Core application, developed on Windows, which I'm trying to deploy into an Elastic Beanstalk linux environment.我有一个基本的 ASP Net Core 应用程序,在 Windows 上开发,我正在尝试将其部署到 Elastic Beanstalk linux 环境中。

When I deploy, I get the following error:部署时,我收到以下错误:

2020/12/02 23:47:10.550207 [ERROR] An error occurred during execution of command
[app-deploy] - [CheckProcfileForDotNetCoreApplication]. Stop running the command.
Error: there is no .runtimeconfig.json file for your single application. 
Please provide a valid application 

The problem is, there is a *.runtimeconfig.json file in my deployed.zip file!问题是,我的 deploy.zip 文件中一个 *.runtimeconfig.json 文件!

The structure of my zip file is loosly:我的 zip 文件的结构松散:

./Config/configs.xml
./Config/secrets.xml
...tons of .dll & .so files
PublicWeb.dll
PublicWeb.runtimeconfig.json

So I'm mystified as to what the problem is.所以我很困惑问题是什么。

So I finally fixed it, by following these steps:所以我最终通过以下步骤修复了它:

  1. I was on .NET 2.1;我在 .NET 2.1; so I upgraded to .NET 3.1 by following the migration guide.所以我按照迁移指南升级到 .NET 3.1。
  2. I created a Debian image on WSL 2, git cloned my repo into it我在 WSL 2 上创建了一个 Debian 图像,git 将我的存储库克隆到其中
  3. Then I ran dotnet deploy from here & uploaded this artifact.然后我从这里运行 dotnet deploy 并上传了这个工件。

I'll note that the zip artifact was much smaller when built on linux for linux.我会注意到,在 linux 上为 linux 构建时,zip 工件要小得多。

暂无
暂无

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

相关问题 在 Linux 上的 AWS Elastic Beanstalk 中部署多个 ASP.NET 核心应用程序(使用 Kestrel 服务器) - Deploying Multiple ASP.NET Core apps in AWS Elastic Beanstalk on Linux (Use Kestrel Server) 我可以在Linux平台上构建.net-core应用程序,然后再部署到Azure Web应用程序吗 - Can I build my .net-core application on a linux platform, then deploy to an azure web app 使用 Plesk 为 Linux 部署 ASP.Net Core - Deploy ASP.Net Core with Plesk for Linux 构建 ASP.Net Core 在 Linux 上部署 Package - Build ASP.Net Core Deploy Package on Linux 在 Linux 主机上部署 Asp.net 核心 mvc 网站(godaddy) - Deploy Asp.net core mvc website on Linux hosting (godaddy) 将 ASP.NET Core 部署到 linux——避免 50 MB 部署? - Deploying ASP.NET Core to linux -- avoiding 50 MB deploy? 如何在 hostgator linux 共享主机上安装 ASP.NET Core 应用程序? - How can I install ASP.NET Core application on a hostgator linux shared hosting? 我如何在 linux 上的特定文件中记录来自 asp.net core 应用程序的消息? - How i can logging messages from asp.net core application in specific file on linux? 我可以在Docker中运行现有的ASP.NET MVC应用程序而无需在Linux中转换为ASP.NET Core - Can I run existing ASP.NET MVC application in Docker without converting to ASP.NET Core in Linux 此站点无法提供来自 do.net linux 的安全连接 asp.net 核心 - This site can’t provide a secure connection asp.net core from dotnet linux
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM