Aran Mulholland
Aran Mulholland

Reputation: 23935

How do I delete the 'site' target directory when deploying to a web site in Azure?

When deploying an ASP.NET 5 application to an Azure web site sometimes I get the pesky error:

ASP.NET 5 An error occurred while starting the application

From an answer to this this question I got from JRoppert that the destination directory on the web site had somehow become corrupt. I used the Kudu tools to delete the site directory and then did a rebuild (Continuous integration from Visual Studio Team Services) and the site starts correctly and works fine.

How can I delete the site directory when doing a build from Visual Studio Team Services?

Upvotes: 1

Views: 80

Answers (1)

Eddie Chen - MSFT
Eddie Chen - MSFT

Reputation: 29966

Azure Web Site supports FTP Deployment. You can install FTP Uploader task and use it to deploy the build to your Azure Web Site. In the setting of FTP Uploader task, you can check "Delete old Files" options to delete the files/folders in web site directory before deployment.

enter image description here

Upvotes: 1

Related Questions