Azure 函数持久 - Microsoft.Azure.WebJobs.Extensions.DurableTask:值不能为空。 (参数'hostConfiguration')

Azure function durable - Microsoft.Azure.WebJobs.Extensions.DurableTask: Value cannot be null. (parameter 'hostConfiguration')

我正在开发 dot net core azure 函数应用程序。我们需要实现并行处理。所以我只是使用包管理器将“Microsoft.Azure.WebJobs.Extensions.DurableTask”添加到我们现有的工作应用程序中,没有完成其他编码。但是,当我尝试使用 f5 启动应用程序时,我在控制台中收到以下异常。还有其他人遇到过类似的问题吗?请让我知道您对此的看法。

Microsoft.Azure.WebJobs.Extensions.DurableTask: Value cannot be null. (parameter 'hostConfiguration').

Durable Functions 依赖于 Azure 或模拟帐户中的存储帐户 using Azurite。您的 local.settings.json 中是否有连接字符串,例如 "AzureWebJobsStorage": "UseDevelopmentStorage=true" (用于模拟存储)并且是模拟器 运行?

可以选择在 host.json 中覆盖 Durable Functions 的一些默认值,如 these docs 中所述。您可以检查该文件中是否没有任何与 Durable Functions 相关的空值。

我不确定这是否是真正的修复,但我能够处理异常。将 .csproj 中的 azureFunctionsVersion v3 更新为 v4,并安装 vs 2022。