我打开了一个新的天蓝色函数项目,我的程序包是:
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#中未注册错误
发布评论