2 回答

TA貢獻1825條經驗 獲得超6個贊
問題是兩個 Nuget 包的版本不匹配。創建新的解決方案時,我無法復制該問題并且綁定工作CloudTable
得很好。與我的解決方案相比,發現我的函數項目引用了另一個項目,該項目依賴于
WindowsAzure.Storage (9.3.3)
因為我需要TableEntity
那里的類型。
現在事情變得棘手了。功能項目有參考
Microsoft.Azure.WebJobs.Extensions.Storage (3.0.6)
那一個依賴于
WindowsAzure.Storage (9.3.1)
9.3.3和9.3.1的版本差異導致了綁定問題。解決方案是在引用的項目中降級到 9.3.1
或者
或者(可能是推薦的):WindowsAzure.Storage
從引用的項目中刪除并將其替換為Microsoft.Azure.Cosmos.Table
也包含TableEntity
.?重要的是不要將其與Microsoft.Azure.CosmosDB.Table
正在棄用的(注意“DB”)混淆。

TA貢獻1833條經驗 獲得超4個贊
我遇到了類似的問題,當我嘗試啟動 Azure Function V3 時遇到此問題:
Error indexing method 'Function' Cannot bind parameter 'Table' to type CloudTable. Make sure the parameter Type is supported by the binding. If you're using binding extensions (e.g. Azure Storage, ServiceBus, Timers, etc.) make sure you've called the registration method for the extension(s) in your startup code (e.g. builder.AddAzureStorage(), builder.AddServiceBus(), builder.AddTimers(), etc.).
如前所述,我在我的項目中看到有WindowsAzure.Storage
一個警告標志并聲明它已被棄用。
讓我的項目監聽表存儲事件的修復方法是更改使用。顯然我已經在我的項目中使用了對 Cosmos 的引用Microsoft.Azure.WebJobs.Extensions.Storage
通過刪除 using: 來解決這個問題,using Microsoft.WindowsAzure.Storage.Table;
只需將其替換為using Microsoft.Azure.Cosmos.Table;
但請注意,如果您正在使用ObjectFlattenerRecomposer.Core,它仍在使用Microsoft.WindowsAzure.Storage.Table
并且尚無法使用Microsoft.Azure.Cosmos.Table
。我已就此事聯系開發商。
- 2 回答
- 0 關注
- 190 瀏覽
添加回答
舉報