绑定类型'serviceBusTrigger'在使用核心工具2的Azure函数C#中未注册错误

编程入门 行业动态 更新时间:2024-10-27 14:19:19
本文介绍了绑定类型'serviceBusTrigger'在使用核心工具2的Azure函数C#中未注册错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我打开了一个新的天蓝色函数项目,我的程序包是:

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

我使用servicebustrigger,并且我的功能代码是基本的:

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

我也有: Azure Functions核心工具(2.0.1-beta.22)和Function Runtime版本:2.0.11415.0

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

运行时,出现"未注册绑定类型'serviceBusTrigger'"错误,并且未触发该函数.有人有主意吗?在我看来,这是一个基本设置..

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

推荐答案

基本上,在v2中,ServiceBus触发器已从默认安装中移出到了可扩展性模型中.您需要根据绑定,将服务总线绑定注册为扩展扩展管理.

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:

  • 将ServiceBus扩展迁移到.NET Core -完成",但查看仍存在问题的评论

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

将ExtensionsMetadatGenerator安装到空的v2应用中后构建失败会阻止VS正确注册扩展程序的工具

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

在扩展安装"中,Extensions.json未更新针对服务总线扩展执行CLI命令解决CLI问题

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

My advice would be to stick to v1 for now.

更多推荐

绑定类型'serviceBusTrigger'在使用核心工具2的Azure函数C#中未注册错误

本文发布于:2023-11-16 02:07:49,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1600031.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:绑定   函数   中未   核心   错误

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!