简体   繁体   English

Azure function - IOT Hub (EventHub) 支持的扩展不工作

[英]Azure function - IOT Hub (EventHub) supported Extensions not working

I've created a PowerShell Core v7 Function App and added an IOT Hub (Event Hub) Function. When I run it I get the following error:我创建了一个 PowerShell Core v7 Function 应用程序并添加了一个物联网中心(事件中心)Function。当我运行它时,我收到以下错误:

Microsoft.Azure.WebJobs.Script: One or more loaded extensions do not meet the 
minimum 
requirements. For more information see https://aka.ms/func-min-extension-versions.
ExtensionStartupType EventHubsWebJobsStartup from assembly 
'Microsoft.Azure.WebJobs.EventHubs, Version=4.2.0.0, Culture=neutral, 
PublicKeyToken=31bf3856ad364e35' does not meet the required minimum version of 4.3.0.0. 
Update your NuGet package reference for Microsoft.Azure.WebJobs.Extensions.EventHubs to 
4.3.0 or later.

Reading the error says that the following article should fix the problem - https://github.com/Azure/Azure-Functions/issues/1987阅读错误表明以下文章应该可以解决问题 - https://github.com/Azure/Azure-Functions/issues/1987

I've added this into my hosts.json and this is when I get the error:我已经将它添加到我的 hosts.json 中,这是我收到错误的时候:

{
"version": "2.0",
"managedDependency": {
"Enabled": true
},
"extensionBundle": {
"id": "Microsoft.Azure.Functions.ExtensionBundle",
"version": "[3.3.0, 4.0.0)"
}
}

What am I missing here?我在这里错过了什么? I can't find any info anywhere other than this MS doc which says the same thing - https://learn.microsoft.com/en-gb/azure/azure-functions/functions-bindings-register#explicitly-install-extensions除了这个 MS 文档之外,我在任何地方都找不到任何信息 - https://learn.microsoft.com/en-gb/azure/azure-functions/functions-bindings-register#explicitly-install-extensions

This morning I recreated the Function App and it all just seemed to work.今天早上我重新创建了 Function 应用程序,它似乎一切正常。 Bit strange as I'd tried this already.有点奇怪,因为我已经尝试过了。 James詹姆士

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM