Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
522 views
in Technique[技术] by (71.8m points)

c# - Precompiled Azure function and CloudTable binding output doesn't work

I'm using a precompiled Azure Function that looks:

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

The output binding looks:

{
  "name": "schedulerTable",
  "type": "table",
  "direction": "out",
  "tableName": "SchedulerTable",
  "connection": "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:

  • Parameter schedulerTable with type SchedulerRegister. The class SchedulerRegister inherits from TableEntity.
  • Parameter schedulerTable with type ICollector.
  • Parameter schedulerTable with type CloudTable. (the case above).

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

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...