问题描述
我正在使用一个预编译的 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 类型的参数 schedulerTable.(上述情况).
请问,¿我该如何解决?(使用输出绑定到 azure 表)
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 绑定输出不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!