问题描述
在修改使用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?
推荐答案
这篇关于在Azure Service Bus触发功能,v2.0功能平台中使用BrokeredMessage的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!