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

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

我打开了一个全新的 azure functions 项目,我的包是:

我用的是servicebustrigger,我的功能代码很基础:

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;
    }
}

我还有: Azure Functions 核心工具 (2.0.1-beta.22) 和函数运行时版本:2.0.11415.0

当我 运行 时,我收到“绑定类型 'serviceBusTrigger' 未注册”错误,并且该函数未被触发。有人有想法吗?这在我看来是一个基本设置..

基本上,在 v2 中,ServiceBus 触发器已从默认安装移到可扩展性模型中。您需要根据 Binding Extensions Management.

将服务总线绑定注册为扩展

不幸的是,这一切都在进行中,因为服务总线绑定存在许多问题:

我的建议是暂时坚持使用 v1。