在Azure Service Bus触发功能,v2.0功能平台中使用BrokeredMessage [英] Use BrokeredMessage in an Azure Service Bus triggered function, v2.0 functions platform

查看:76
本文介绍了在Azure Service Bus触发功能,v2.0功能平台中使用BrokeredMessage的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在修改使用Azure Service Bus队列触发器模板时提供的示例代码时,如果将myQueueItem的数据类型更改为BrokeredMessage,则会收到编译错误,提示类型或名称空间名称为'BrokeredMessage' ' 不能 被发现".

In modifying the example code provided when I use the Azure Service Bus Queue trigger template, if I change the data type of myQueueItem to BrokeredMessage, I get a compilation error saying that the "type or namespace name 'BrokeredMessage' could not be found".

如果我添加了"using Microsoft.ServiceBus.Messaging",它是声明BrokeredMessage的程序集,则我将收到类型或名称空间名称"ServiceBus"在名称空间"Microsoft"中不存在的编译错误消息. ".

If I add "using Microsoft.ServiceBus.Messaging", which is the assembly that declares BrokeredMessage, I then get a compilation error message of "type or namespace name 'ServiceBus' does not exist in the namespace 'Microsoft'". 

我尝试将Microsoft.ServiceBus添加到"extensions.csproj"中,但这无济于事.

I've tried adding Microsoft.ServiceBus to the 'extensions.csproj', but that doesn't help.

如何在Azure函数中使用BrokeredMessage?

How do I use BrokeredMessage in an Azure function?

推荐答案

道格-您可以尝试使用" Microsoft.Azure.ServiceBus "
Hi Doug - Could you try using "Microsoft.Azure.ServiceBus" namespace instead?


这篇关于在Azure Service Bus触发功能,v2.0功能平台中使用BrokeredMessage的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆