简体   繁体   中英

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:

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

I've added this into my hosts.json and this is when I get the error:

{
"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

This morning I recreated the Function App and it all just seemed to work. Bit strange as I'd tried this already. James

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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