Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The binding type 'serviceBusTrigger' is not registered error in azure functions c# with core tools 2

I open a fresh new azure functions project, my packages are:

  • Microsoft.Azure.WebJobs 3.0.0-beta4
  • Microsoft.Azure.WebJobs.ServiceBus 3.0.0-beta4
  • Microsoft.NET.Sdk.Functions 1.0.7
  • NETStandardLibrary 2.0.1

I use servicebustrigger and my function code is basic:

public static class Function1
{
    [FunctionName("OrderPusherFunction")]
    public static Task Run([ServiceBusTrigger("orders","orderpusher", Connection ="ServiceBus")]
    string myQueueItem, TraceWriter log)
    {
        log.Info($"C# Queue trigger function processed: {myQueueItem}");
        return Task.CompletedTask;
    }
}

I also have: Azure Functions Core Tools (2.0.1-beta.22) and Function Runtime Version: 2.0.11415.0

When i run, i get "The binding type 'serviceBusTrigger' is not registered" error, and the function does not get triggered. Anyone has an idea? This looks to me as a basic setup..

like image 729
Emre Ertugrul Avatar asked Jan 17 '18 07:01

Emre Ertugrul


1 Answers

Basically, in v2 ServiceBus trigger was moved out of the default installation into Extensibility model. You need to register Service Bus binding as an extension as per Binding Extensions Management.

Unfortunately, this is all work-in-progress, as there is a number of issues for Service Bus binding:

  • Migrate ServiceBus Extension to .NET Core - "Done", but see the comments for which problems still exist

  • Build failure after installing ExtensionsMetadatGenerator into empty v2 app prevents VS tooling from registering the extension properly

  • Extensions.json is not updated when "extension install" CLI command executed for service bus extension for CLI issue

My advice would be to stick to v1 for now.

like image 78
Mikhail Shilkov Avatar answered Sep 24 '22 00:09

Mikhail Shilkov