79386232

Date: 2025-01-25 05:45:16
Score: 1.5
Natty:
Report link

Just in case others end up here as well. In case you are using codebuild + codepipeline, the problem seems to be with how the packages are zipped.

For me, what did the trick was:

version: 0.2
 
phases:
  install:
    runtime-versions:
      dotnet: 4.8
    commands:
      - msbuild /t:restore Project.sln
 
  build:
    commands:
      - echo Starting build process...
      - msbuild Project.sln /t:Package /p:Configuration=Release /p:Platform="Any CPU" /p:DeployIisAppPath="Default Web Site"
      - cp obj\Release\Package\Project.zip Project.zip

  post_build:
    commands:
      - powershell Expand-Archive -Path "Project.zip" -DestinationPath "output-folder" -Force

artifacts:
  files:
    - '**/*'
  base-directory: "output-folder" 

Refereces: https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/applications-sourcebundle.html#using-features.deployment.source.dotnet

Reasons:
  • Probably link only (1):
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: user29358014