3

调用 URL 时,用于 AZure devOPS 的 VSTS 代理无法删除或覆盖文件。但是,当 IIS 工作进程被终止并重新部署 Release 时,它​​工作正常。

我已经启用了覆盖和清理选项。但它仍然无法部署。

2018-11-17T13:05:23.2176452Z ##[section]Starting: Copy Files to: D:\IIS Hosting\CICD
2018-11-17T13:05:23.2179160Z ==============================================================================
2018-11-17T13:05:23.2179236Z Task         : Copy Files
2018-11-17T13:05:23.2179314Z Description  : Copy files from source folder to target folder using match patterns (The match patterns will only match file paths, not folder paths)
2018-11-17T13:05:23.2179373Z Version      : 2.117.2
2018-11-17T13:05:23.2179438Z Author       : Microsoft Corporation
2018-11-17T13:05:23.2179495Z Help         : [More Information](https://go.microsoft.com/fwlink/?LinkID=708389)
2018-11-17T13:05:23.2179554Z ==============================================================================
2018-11-17T13:05:23.4602460Z found 7 files
2018-11-17T13:05:23.4602904Z Cleaning target folder: D:\IIS Hosting\CICD
2018-11-17T13:05:23.4650798Z ##[error]Unhandled: Failed rmRF: EPERM: operation not permitted, unlink 'D:\IIS Hosting\CICD\AZSync.Web.dll'
2018-11-17T13:05:23.4659907Z ##[section]Finishing: Copy Files to: D:\IIS Hosting\CICD

给出一个错误 -

在此处输入图像描述

4

1 回答 1

3

解决方案是将任务复制app_offline.htm到 IIS 托管目录,这将阻止 dotnet core 运行。复制/覆盖所有文件,然后app_offline.htm使用删除文件任务删除。

于 2018-11-28T02:58:06.863 回答