Azure-webjobs-sdk: Functions v3: Can't bind Table to type Microsoft.WindowsAzure.Storage.Table.CloudTable

Created on 13 Aug 2020  路  3Comments  路  Source: Azure/azure-webjobs-sdk

I am following the steps described here https://docs.microsoft.com/en-us/azure/azure-functions/functions-bindings-storage-table?tabs=csharp#cloudtable to use CloudTable in a V3 Function.

I have Microsoft.Azure.WebJobs.Extensions.Storage (4.0.2) and Microsoft.NET.Sdk.Functions (3.0.9) with target framework .NET Core 3.1.

The solution compiles but when I debug in Visual Studio I get this error:
The 'Function1' function is in error: Microsoft.Azure.WebJobs.Host: Error indexing method 'Function1'. Microsoft.Azure.WebJobs.Extensions.Storage: Can't bind Table to type 'Microsoft.WindowsAzure.Storage.Table.CloudTable'.

image

_Originally posted by @Rafaelki in https://github.com/Azure/azure-webjobs-sdk/issues/2529#issuecomment-673594890_

Most helpful comment

When we moved the Storage extension to 4.0, it updated to the latest Storage SDK -- which changed namespaces on us.

Change the using Microsoft.WindowsAzure.Storage.Table; statement to using Microsoft.Azure.Cosmos.Table; and it should get you working.

All 3 comments

When we moved the Storage extension to 4.0, it updated to the latest Storage SDK -- which changed namespaces on us.

Change the using Microsoft.WindowsAzure.Storage.Table; statement to using Microsoft.Azure.Cosmos.Table; and it should get you working.

Thanks @brettsam
I can confirm that the errors in the debug console are gone.
(I would have prefered that you give me the time to reproduce the fix BEFORE closing the issue)

This issue was gone for me when Microsoft.Azure.WebJobs.Extensions.Storage and Microsoft.NET.Sdk.Functions were both in the 3.0.11 version.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mathewc picture mathewc  路  5Comments

drchilds picture drchilds  路  4Comments

hajekj picture hajekj  路  3Comments

lopezbertoni picture lopezbertoni  路  4Comments

sergey-netdev picture sergey-netdev  路  5Comments