ASP.NET Core app deploy to AWS Beanstalk on Linux


Hi all,
I am trying to push my ASP.NET Core 3.1 app to an AWS Beanstalk (Linux) instance, but it's giving me an error during the deployment.
That's the error - NB the placeholder "SLNNAME" is my Visual Studio solution name:

[ERROR] An error occurred during execution of command [app-deploy] - [CheckProcfileForDotNetCoreApplication]. Stop running the command. Error: error stat /var/app/staging/staging_SLNNAME_server/SLNNAME.dll: no such file or directory with file /var/app/staging/staging_SLNNAME_server/SLNNAME.dll

The project I am trying to deploy is called "SLNNAME.Server.Web" as well as the corresponding DLL. But according to the error above AWS is looking for a DLL named just "SLNNAME".
So I tried to rename the DLL to "SLNAME.dll" and magically it started to work correctly!

Trying to set the correct DLL name, I created a Procfile with this directive:

web: dotnet SLNNAME.Server.Web.dll

The Procfile is at the root level of the zip along with all the application DLLs, but it seems to be ignored.

I have uploaded the code using a simple zip file, AWS Toolkit for Visual Studio and the GitHub actions. All of them are returning the same error.

How can I tell the correct DLL name?

I attach a screenshot of the zip file uploaded to AWS

Thanks in advance

UPDATE: If I change the output DLL name to SLNNAME.dll the Procfile is read and executed correctly. So to make it work I have to change the Procfile to:

web: dotnet SLNNAME.dll

And the csproj file with:


But this is NOT a solution, it's just a workaround. I think there's something wrong with the service itself that must be fixed  
Edited by: krusty on Jul 10, 2020 9:55 AM
posta 4 anni fa645 visualizzazioni
3 Risposte

Yes, this is indeed very annoying, I noticed the same when the assembly file name is composed by intermediate periods elastic beanstalk will only take the first part and tries to find a .dll named wrongly.

For example: Company.Module.Functionality.dll will be looked up as Company.dll hence the deployment fails. And happens even with the Procfile configured properly.

This needs to be fixed since it is common to have assemblies named as mentioned.

con risposta 4 anni fa

Today I received an email from AWS support saying the issue has been fixed. I have tried it and actually it works!

Please be sure to use Linux 2/2.0.1 as platform

con risposta 4 anni fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande