Pipeline release from Azure Windows App service to Azure Linux App service problems

Copper Contributor



We have a Release with a Stage to deploy our web api to Azure on a Windows App Service Plan.

It works now for years without any issue.


We needed to deploy the api to a new App Service Plan on Linux this time.

So I added to the existing Release conf a second Stage "deploy to linux plan".


The parameters are the same if not the destination plan and azure web app.


The problem is that de deployment is done under a sub, sub, sub directory on the wwwroot and not on it directly, forcing me to add Post Deployment Action to move the files to the wwwroot.

I feel it's not a normal process, but I can't find a way to make the wwwroot directory the real output for the deployment.



If I just deploy the code without the Post Deployment Action scripts, the code is under a sub directory :


And for the apps working, the files in the Out directory needs to be directly in the wwwroot.

So for this working, I manually move the files to the wwwroot folder in Post Deployment Action.


Here is the configuration and the Post Deployment Action I use to make the web app functional.

Deployment to linux web appDeployment to linux web app



post deployment action to move files on wwwroot folderpost deployment action to move files on wwwroot folder


Deployment log:

2022-03-30T08:55:44.5688555Z ##[section]Starting: Deploy Azure App Service
2022-03-30T08:55:44.5701896Z ==============================================================================
2022-03-30T08:55:44.5702312Z Task         : Azure App Service deploy
2022-03-30T08:55:44.5702809Z Description  : Deploy to Azure App Service a web, mobile, or API app using Docker, Java, .NET, .NET Core, Node.js, PHP, Python, or Ruby
2022-03-30T08:55:44.5703252Z Version      : 4.198.0
2022-03-30T08:55:44.5703519Z Author       : Microsoft Corporation
2022-03-30T08:55:44.5703844Z Help         : https://aka.ms/azureappservicetroubleshooting
2022-03-30T08:55:44.5704248Z ==============================================================================
2022-03-30T08:55:44.9868417Z Got service connection details for Azure App Service:'XXXXX-api-preprod'
2022-03-30T08:55:45.9300315Z Package deployment using ZIP Deploy initiated.
2022-03-30T08:56:12.6492352Z Deploy logs can be viewed at https://XXXXX-api-preprod.scm.azurewebsites.net/api/deployments/YYYYY/log
2022-03-30T08:56:12.6493808Z Successfully deployed web package to App Service.
2022-03-30T08:56:12.9898232Z Trying to update App Service Application settings. Data: {"SCM_COMMAND_IDLE_TIMEOUT":"1800"}
2022-03-30T08:56:13.3328695Z App Service Application settings are already present.
2022-03-30T08:56:13.7315638Z Executing given script on Kudu service.
2022-03-30T08:56:22.1077125Z Successfully added release annotation to the Application Insight : AppInsight_XXXXX-api-preprod
2022-03-30T08:56:23.4171628Z Successfully updated deployment History at https://XXXXX-api-preprod.scm.azurewebsites.net/api/deployments/ZZZZZ
2022-03-30T08:56:23.8591314Z App Service Application URL: http://XXXXX-api-preprod.azurewebsites.net
2022-03-30T08:56:24.1073066Z ##[section]Finishing: Deploy Azure App Service


I just can't tell me that this is the way to do it and a I assume there is a more "best practice" way...

Thank you for the help.

0 Replies