0

I am trying to build a CD pipeline using the GitHub Actions and AWS Beanstalk (Linux) for my ASP.NET Core 3.1 app. I have configured the YML file as follows:

- name: dotnet Build
  run: dotnet build src/SLNNAME.sln -c Release --no-restore

- name: dotnet Publish
  run: |
    dotnet publish src/SLNNAME.Server/SLNAME.Server.Web/SLNNAME.Server.Web.csproj -c Release -o staging_SLNNAME_server -r linux-x64

- name: Build deployment package
  run: zip -r staging-server-deploy.zip staging_SLNNAME_server

..

- name: Deploy to AWS Beanstalk
  uses: einaregilsson/beanstalk-deploy@v10
  with:
    aws_access_key: ${{ secrets.AWS_ACCESS_KEY_ID }}
    aws_secret_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
    region: ${{ secrets.AWS_REGION }}
    application_name: SLNNAME-staging-app-web
    environment_name: SLNNAME-staging-server
    version_label: "staging-app-web-${{ steps.format-time.outputs.replaced }}"
    deployment_package: staging-server-deploy.zip

But an error occurs during the deployment to AWS. In particular, looking at the Beanstalk logs I can read the following error:

[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

Basically, I think it is looking for a DLL with the solution name instead of the project name - SLNName.Server.Web. I wonder yet where it is picking up the solution name, since it is not part of the zip file. I gave a try with the --self-contained flag as well, but the error is exactly the same.

I have this error even if I try to publish the solution using the AWS toolking Visual Studio extension.

The only way I have found to fix this is to change the project output DLL name to match the solution one, but it doesn't make any sense to me - I might have more problems in future.

Thanks

3
  • I realized that a Procfile could fix the issue according to the documentation. So I created one placed in the solution root but referenced to the project to deploy. Here's the file content: web: dotnet staging_<placeholder>_server/SLNNAME.Server.Web.dll , but AWS doesn't read it for some reason Commented Jul 9, 2020 at 18:34
  • I'm hitting this error now - any luck, @Krusty? Commented Jul 12, 2020 at 21:03
  • 1
    @Stachu Not yet. I have posted on AWS forum but I didn't receive any answer from moderators Commented Jul 13, 2020 at 15:03

3 Answers 3

1

Warning: This is a workaround, not a solution!

On the project that's failing to deploy, change the "Assembly name" in Project Properties / Application tab, to the name of the DLL it's missing (typically the solution name or the first period-separated part of the namespace).

i.e. "SLNNAME"

Then, redeploy your beanstalk app and it should work.

Sign up to request clarification or add additional context in comments.

1 Comment

Yes I confirm that. That's the workaround I have been using
0

I have opened a ticket on AWS platform and this issue has been stated as a bug by the support team.

They replied to me with:

I reached out to internal team and informed the team regarding the bug. [...] I have added your voice for this request I raised with internal team to add more weightage on the issue. Currently, I am unable to provide you with ETA [...] you can certainly be assured that the internal team is looking into this issue and fix it as quickly as possible

Hoping they will fix this soon as possible

Comments

0

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.