azure-functions - Azure 函数 : Publish fails with message "Web Deploy cannot modify the file on the Destination because it is locked by an external process."

标签 azure-functions

我正在开发一个 Azure Functions 项目,当我第一次发布时,好的。
然后我再次发布,出现此错误:

Web Deploy cannot modify the file 'FunctionApp5.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 门户并重新启动此 Azure Function App 时才发布

Azure Portal and Visual Studio 2017

最佳答案


MSDEPLOY_RENAME_LOCKED_FILES=1 

在 Azure 函数应用程序设置中通常解决了这个问题

Configure

这也可以在 Visual Studio 中的发布 -> 应用程序设置中完成:

Application Settings

关于azure-functions - Azure 函数 : Publish fails with message "Web Deploy cannot modify the file on the Destination because it is locked by an external process.",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48329974/

相关文章:

c# - 允许字符串 C# 中两个允许值之一的优雅方式

azure - 如何基于函数槽调用Azure Functions

azure - 自动重试 CosmosDb 输出绑定(bind)

mongodb - 如何从 Azure Function 连接到 Azure Cosmos DB for MongoDB

c# - 在 Azure Function Service Bus 触发器中使用异步方法

java - Microsoft.WindowsAzure.Storage : No valid combination of account information found - Tried to edit conn string, 但不起作用

Azure Functions - 跨函数应用程序共享代码

azure - 通过 Startup.cs 添加依赖项注入(inject)到 Azure Functions 会导致主机错误

azure-functions - Azure Function App 运行时在 Visual Studio 2019 版本 16.11.4 中不可用

azure - 使用 Bicep 输出新创建的功能应用程序 key