question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Azure App Service Deploy - Deploying to virtual directory wipes contents of site\wwwroot

See original GitHub issue

Question, 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: image

Task logs

Log (some obfuscation where necessary): 3_Azure App Service Deploy Dev.log

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:6
  • Comments:12 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
HansOlavScommented, Feb 11, 2020

@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.

1reaction
arjguptacommented, Jan 29, 2020

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Azure Slot Deploy to Virtual Directory Overwrites/Clears the ...
I am facing an issue with Azure Deployment slots. Previously I had a .NET Core 2.2 AppService in Azure and had a virtual...
Read more >
Azure Deployment to Azure sub-directory (Application Type)
1. In the Azure portal > Select App Services, and then select your app. ... 3. Click New virtual application or directory and...
Read more >
How to clean up wwwroot folder on the target Azure ...
We are using VSTS's Azure App Service Deploy task to deploy to Azure Websites Windows Server for a ASP.NET Web API project, is...
Read more >
Deploy Web App to a Sub-folder on Azure - Sajeetharan
With Virtual Directories, You could keep your web sites in separate folders and use the 'virtual directories and applications' settings in Azure ......
Read more >
Configuring Virtual Applications with Azure App Services ...
In reality you would build your 2nd service and deploy it properly to this new application folder. xcopy /E /I wwwroot_NEW wwwroot_DEV. Virtual...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found