简体   繁体   中英

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.

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!

The structure of my zip file is loosly:

./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; so I upgraded to .NET 3.1 by following the migration guide.
  2. I created a Debian image on WSL 2, git cloned my repo into it
  3. Then I ran dotnet deploy from here & uploaded this artifact.

I'll note that the zip artifact was much smaller when built on linux for linux.

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM