Azure App Service Deploy - Deploying to virtual directory wipes contents of site\wwwroot
See original GitHub issueQuestion, Bug, or Feature?
Type: bug
Enter Task Name: Azure App Service deploy (v4.*)
Environment
Azure DevOps (hosted agent) Agent Specified: windows-2019
Issue Description
In Azure we’ve got an Azure App Service resource setup with the following path mappings: / => site\wwwroot (Type: Application) /foo => site\foo (Type: Application)
Basically a static web client is hosted at the root and a .NET core 3.0 API being hosted at /foo. The client is deploying fine to the root but anytime we deploy the .NET core project to virtual directory /foo it also completely wipes the contents of site\wwwroot. Note that deploying the client does NOT wipe site\foo.
The dotnet
command being run to package the .NET core project is:
--configuration $(BuildConfiguration) --output $(Build.ArtifactStagingDirectory) --runtime win-x86 --self-contained true
The output from that is what is used as the source folder for the task in question Azure App Service Deploy
.
** Note: Publishing to app service from Visual Studio doesn’t wipe the root for what it’s worth **
Task Settings:
Task logs
Log (some obfuscation where necessary): 3_Azure App Service Deploy Dev.log
Issue Analytics
- State:
- Created 4 years ago
- Reactions:6
- Comments:12 (7 by maintainers)
Top GitHub Comments
@eaarora-ms Cool. FYI, the first thing I checked was to see if the runtime versions in Kudu were different, but they’re exactly the same - even the commit hash.
We have discovered while making certain app settings, kudu package handling can misbehave. We are under discussion with app service team and will update this thread as and when the fix is made.