Azure / azure-functions-eventgrid-extension

EventGrid extension for Azure Functions
MIT License
48 stars 34 forks source link

The binding type(s) 'eventGridTrigger' are not registered. Please ensure the type is correct and the binding extension is installed. #54

Closed KasperHoldum closed 2 years ago

KasperHoldum commented 6 years ago

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?

rohitrathour commented 6 years ago

Check Platform and HTTP version in General Setting of Function App on Azure. It should be 64 Bit and 2.0.

KasperHoldum commented 6 years ago

This is running locally and not on Azure.

thomasjedstrom commented 6 years ago

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

lonpalmer commented 6 years ago

Same problem for me using EventGridTrigger on v2 function using the Java runtime.

jeeteshm commented 5 years ago

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

emchFr commented 5 years ago

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.

Qba91 commented 5 years ago

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
}
vullnetyy commented 5 years ago

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.

alrod commented 2 years ago

Closing as resolved.