由于 'Microsoft.ApplicationInsights.Extensions.Intercept_x64.dll' 已锁定,所有 Azure 连续构建均失败

All Azure Continuous Builds failed because 'Microsoft.ApplicationInsights.Extensions.Intercept_x64.dll' is locked

我在旧的完整 Azure 门户 上设置连续 A​​zure 网站 部署。每次构建都因错误而失败:

Exception Message: Web Deploy cannot modify the file 'Microsoft.ApplicationInsights.Extensions.Intercept_x64.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.

当我停止网站时,我能够 运行 成功构建,但这与持续集成无关。怎么了?

这是因为 ApplicationInsights 正在监视您的性能,并且只要您的应用程序处于 运行 状态,IIS 就会使用它,因此被锁定。

您有两个选择: 如果您需要更新此资源,请将您的网站脱机。 或者如果资源没有改变就不要更新它。

编辑:
第三个选项:
您可以尝试 AppOffline 标志是否可以帮助您,但我的猜测是: http://blogs.msdn.com/b/webdev/archive/2013/10/30/web-publishing-updates-for-app-offline-and-usechecksum.aspx

我相信它已在 0.13 AI SDK 中修复。请尝试使用最新版本。