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

故事扮演 提交于 2019-12-19 02:47:11

问题


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..


回答1:


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.



来源:https://stackoverflow.com/questions/48295848/the-binding-type-servicebustrigger-is-not-registered-error-in-azure-functions

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!