【发布时间】:2023-03-23 18:05:02
【问题描述】:
我创建了一个虚拟的 Hello World ASP.NET 5 (MVC 6) 项目,托管在 Visual Studio Online 的 Git 中。 我按照this document 中描述的步骤构建并部署到我的 Azure 网站中。
我尝试了几次,因为构建失败并出现错误,例如“无法恢复 NuGet 包”或不存在的 wwwfolder(我必须提交源代码管理才能使其正常工作),但我让它正常工作并且应用程序已启动并运行。
我需要帮助的问题是持续集成配置。在 Visual Studio 中,只要在我的主分支中签入,我就选择了一个 CI 触发器来构建/部署。 这会正确触发尝试,但它会不断失败并出现此错误。
Error Code: ERROR_FILE_IN_USE
More Information: Web Deploy cannot modify the file 'AspNet.Loader.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.
如何解决这个问题?
谢谢。
PS:我也不知道为什么在部署下的 Azure 网站中我看不到日志。当我使用 GitHub 挂钩时,它会显示所有失败/成功的部署。
通常在 Azure 下的 web app > DEPLOYMENTS
【问题讨论】:
标签: azure continuous-integration asp.net-core tfsbuild azure-devops