Closed KasperHoldum closed 2 years ago
Check Platform and HTTP version in General Setting of Function App on Azure. It should be 64 Bit and 2.0.
This is running locally and not on Azure.
Just ran into this as well. Created function app in VS using the EventGridTrigger template: Microsoft.Net.SDK.Functions 1.0.21 Microsoft.Azure.WebJobs.Extensions.EventGrid (any 2. version, 1. breaks the build in other ways) NetStandardLibrary 2.0.3
Same problem for me using EventGridTrigger on v2 function using the Java runtime.
Using the following package reference in the .csproj file solved this issue for me:
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.EventGrid" Version="2.0.0" />
I had the same problem. I just updated Microsoft.Azure.Webjobs.Extensions.EventHubs and Microsoft.NET.sdk.Functions in Nuget and now the function runs perfectly in debug mode.
I had such a problem:
The binding type(s) 'eventHubTrigger' are not registered. Please ensure the type is correct and the binding extension is installed.
My enviroment:
Azure Functions Core Tools (2.7.1158 ...)
Function Runtime Version: 2.0.12438.0
solution: In root project path add host.json file:
{
"version": "2.0",
"extensionBundle": {
"id": "Microsoft.Azure.Functions.ExtensionBundle",
"version": "[1.*, 2.0.0)"
}
}
this is needed to run function version 2.x C # script, JavaScript, F #, Java and Python
My extensions.csproj file:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<WarningsAsErrors></WarningsAsErrors>
<DefaultItemExcludes>**</DefaultItemExcludes>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.EventHubs" Version="3.0.0-beta5" />
<PackageReference Include="Microsoft.Azure.WebJobs.Script.ExtensionsMetadataGenerator" Version="1.0.0-beta2" />
</ItemGroup>
</Project>
My function.json file in function folder (with index.js):
{
"bindings": [
{
"type": "eventHubTrigger",
"name": "eventHubMessage",
"direction": "in",
"eventHubName": "eventsomehub",
"path": "eventsomehub",
"connection": "eventsHub",
"cardinality": "one",
"consumerGroup": "hub"
}
],
"disabled": false
}
Adding
"extensionBundle": {
"id": "Microsoft.Azure.Functions.ExtensionBundle",
"version": "[1.*, 2.0.0)"
}
to my host.json file as @Qba91 described solved the issue for me.
Closing as resolved.
I have two projects using the AzFunc runtime v. 1.0.19 and newest tooling in VS (15.10.2009.0). Both are referencing Microsoft.Azure.WebJobs.Extensions.EventGrid (2.0.0-beta4) and ExtensionsMetadataGenerator (1.0.0). When I run one of the project I get the following error:
The following 1 functions are in error: [05-09-2018 07:31:21] CatalogUpdated: The binding type(s) 'eventGridTrigger' are not registered. Please ensure the type is correct and the binding extension is installed.
When comparing the two projects, they seem identical in references and types, so I am clueless as to why one would work when the other doesn't. How would I go about debugging this?