我正在使用一个预编译的azure函数,它看起来:

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

输出绑定看起来:
{
  "name": "schedulerTable",
  "type": "table",
  "direction": "out",
  "tableName": "SchedulerTable",
  "connection": "SchedulerTable"
}

当我从函数中移除参数schedulerTable时,它就工作了。“主持人在我面前说的话是:
Microsoft.Azure.WebJobs.Host: Error indexing method 'Functions.InputFileAdaptorAF'. Microsoft.Azure.WebJobs.Host: Can't bind Table to type 'Microsoft.WindowsAzure.Storage.Table.CloudTable'.

实际上,当我添加一个表输出绑定并尝试使用不同的替代方法时,什么都不起作用。不起作用的替代方案是:
schedulerRegister类型的schedulerTable参数。类SchedulerRegister继承自TableEntity。
具有ICollector类型的SchedulerTable参数。
参数schedulerTable的类型为cloudTable。(上述情况)。
求你了,我怎么能修好它?(使用到azure表的输出绑定)

最佳答案

您可能遇到类型不匹配问题。您正在使用哪个版本的存储sdk?您需要确保存储sdk引用符合运行时的预期,即当前的7.2.1。
请确保您引用的是存储sdk 7.2.1版。

08-25 19:46