When building a .NET Web App with /p:WebPublishMethod=Package build argument to package as a web deployment package, the package is created with a folder structure where all the dll files are located in inner subfolder. If we use Azure DevOps Windows agents, We can deploy these packages using msdeploy.exe to correct path of Azure App service without worrying about the folder structure of the build package. However, If we use Azure DevOps Linux agents to deploy, it deploys packages with kudus copy and copying the inner folder structure to wwwroot. Then the App service will fail to run the .NET web application. This blog explains how to correctly deploy a .NET Web App built with Windows as a web deployment package using Azure DevOps Linux agents.
Web deployment package would create a folder hierarchy such as below. If we deploy below package using Linux agent, it will copy content folder with the all the sub folders to the wwwroot of the App service making the app to not runnable.