在我的项目中,我们使用 Azure App Service Deploy 任务来部署我们的 webdeploy 包。
我注意到有时在部署时会出现文件使用错误,即使已设置“使应用程序离线”选项也是如此。
解决这个问题的最佳方法是什么?
这是错误:
2016-12-07T15:26:44.8411101Z ##[error]Failed to deploy website.
2016-12-07T15:26:44.8411101Z ##[error]Error Code: ERROR_FILE_IN_USE
2016-12-07T15:26:44.8421096Z More Information: Web Deploy cannot modify the file 'Microsoft.CodeAnalysis.CSharp.dll' on the destination because it is locked by an external process. In order to allow the publish operation to succeed, you may need to either restart your application to release the lock, or use the AppOffline rule handler for .Net applications on your next publish attempt. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_FILE_IN_USE.
您现在可以使用'Azure 应用服务管理 https://github.com/Microsoft/vsts-tasks/tree/master/Tasks/AzureAppServiceManage' 任务来停止和启动应用程序服务以防止文件正在使用中。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)