本文介绍了在VSTS中进行每次部署之前,如何清理目标Azure网站Windows Server上的wwwroot文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大约十二次部署后,由于积极的开发和部署, wwwroot 目录中充满了许多文件.我们正在使用VSTS的 Azure App Service Deploy 任务将其部署到ASP.NET Web API项目的Azure网站Windows Server,有没有一种方法可以清除 wwwroot 目录,部署到Avsts的部署前清理工作?

After about a dozen deployments, the wwwroot directory is filled with a lot of files due to active development and deployments. 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 there a way to clean up the wwwroot directory before deploying to the Avsts pre-deployment clean up?

推荐答案

在使用 Azure App Service部署任务时,并且正在使用发布方式Web部署选项,还有一个附加选项可以删除目标位置的其他文件.

When using the Azure App Service Deploy task, and you are using the Publish using Web Deploy option, there is an additional option to Remove Additional Files at Destination.

如果选中此选项,则部署过程将删除目标中的所有文件,该目标中正在部署的程序包中没有相应的文件.

If you check this option, the deployment process will remove any files at the destination where there is no corresponding file in the package that is being deployed.

换句话说,它将删除先前部署中不再需要的所有剩余文件.

In other words, it'll remove any left over files from a previous deployment that are no longer required.

这篇关于在VSTS中进行每次部署之前,如何清理目标Azure网站Windows Server上的wwwroot文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-28 19:30