在我的项目中,我们使用 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.