Search code examples
asp.netazure-devopsamazon-elastic-beanstalkweb-config

Azure Pipeline Deploy To AWS Elastic Beanstalk Task failes because web.config is missing


I am currently trying to get a Azure Pipeline running for a small asp.net web app. I try to host the app in AWS Elastic Beanstalk. When i publish the app via the Visual Studio AWS Toolkit everything is fine and the app is running as expected on Elastic Beanstalk.

But my integration in the Azure Pipeline does not work the same. I have the "Deploy to Elastic Beanstalk" Task defined like that:Deploy to Beanstalk Task config

The pipeline is running until the Deploy to Elastic Beanstalk" Task without problems. Than i get this error: Deploy to Beanstalk Deploy Error

I compared the two zip folders (one from AWS toolkit in VS and from Azure pipeline) and they are equal.

The mentioned web.config file is existing in both folders.

I alread spend around 2 days looking for a solution without success.

Thank you very much in advance Korbinian

I checked the two zip files (one from Visual Studio AWS Toolkit and from Azure Pipeline) in both zip files the web.config file is available


Solution

  • I found a solution. I changed:

    • the "Archive File To Create" in the "Archive Artifacts" task to $(Agent.ReleaseDirectory)
    • the "Deployment Bundle Type" in the "Deploy to Elastic Beanstalk" task to "ASP .Net Core Windows"
    • the "Published Application Path" in the "Deploy to Elastic Beanstalk" task to $(Agent.ReleaseDirectory)

    Afterwards everything worked.