预编译的Azure函数和CloudTable绑定输出不起作用 [英] Precompiled Azure function and CloudTable binding output doesn't work

查看:72
本文介绍了预编译的Azure函数和CloudTable绑定输出不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用看起来像这样的预编译的Azure函数

I'm using a precompiled Azure Function that looks:

public static async Task Run(Stream inputBlob, Stream outputJson, Stream outputXml, CloudTable schedulerTable)

输出绑定看起来是:

{
  "name": "schedulerTable",
  "type": "table",
  "direction": "out",
  "tableName": "SchedulerTable",
  "connection": "SchedulerTable"
}

当我从函数中删除参数schedulerTable时,它起作用了. ‘主持人扔到我脸上的消息是:

When i remove the parameter schedulerTable from my function, it's works. ´The message that the host throws in my face is:

Microsoft.Azure.WebJobs.Host: Error indexing method 'Functions.InputFileAdaptorAF'. Microsoft.Azure.WebJobs.Host: Can't bind Table to type 'Microsoft.WindowsAzure.Storage.Table.CloudTable'.

真的,当我尝试使用不同的替代方法添加表输出绑定时,没有任何效果.无效的替代方法是:

Really, when i add a table output binding trying with diferent alternatives, nothing works. Alternatives that doesn't work are:

  • 类型为SchedulerRegister的参数schedulerTable. SchedulerRegister类从TableEntity继承.
  • 类型为ICollector的参数schedulerTable.
  • 参数调度程序表,类型为CloudTable. (上述情况).

请,¿我如何解决? (使用输出绑定到天蓝色表)

Please, ¿How I can fix it? (Use an output binding to azure table)

推荐答案

您可能会遇到类型不匹配的问题.您正在使用哪个版本的存储SDK?您需要确保存储SDK引用与运行时期望的匹配,当前为7.2.1.

You're likely running into type mismatch issues. What version of the storage SDK are you using? You need to make sure storage SDK references match what the runtime expects, which currently is 7.2.1.

请确保您引用的是存储SDK版本7.2.1.

Please make sure that you're referencing the storage SDK version 7.2.1.

这篇关于预编译的Azure函数和CloudTable绑定输出不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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