预编译的Azure功能和CloudTable绑定输出不起作用

gab*_*mgp 5 c# azure azure-table-storage azure-functions

我正在使用预编译的Azure函数,它看起来像:

public static async Task Run(Stream inputBlob, Stream outputJson, Stream outputXml, CloudTable schedulerTable)
Run Code Online (Sandbox Code Playgroud)

输出绑定看起来:

{
  "name": "schedulerTable",
  "type": "table",
  "direction": "out",
  "tableName": "SchedulerTable",
  "connection": "SchedulerTable"
}
Run Code Online (Sandbox Code Playgroud)

当我从我的函数中删除参数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'.
Run Code Online (Sandbox Code Playgroud)

真的,当我添加一个表输出绑定试图与不同的替代品,没有任何作用.不起作用的替代方案是:

  • 参数schedulerTable,类型为SchedulerRegister.SchedulerRegister类继承自TableEntity.
  • 带有ICollector类型的参数schedulerTable.
  • 参数schedulerTable,类型为CloudTable.(上述情况).

拜托,我怎么解决?(使用输出绑定到azure表)

Fab*_*nte 11

您可能遇到类型不匹配问题.您使用的是什么版本的存储SDK?您需要确保存储SDK引用与运行时期望的内容匹配,当前为7.2.1.

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