c# - Azure 函数 - 在 Azure 存储中找不到方法

标签 c# azure azure-storage azure-functions

我正在使用 azure 表存储来保存数据。我想将该方法创建为 azure 函数。当我本地调试时,它工作正常。当将其添加到azure函数中时,出现异常错误

找不到方法:' bool 值 Microsoft.WindowsAzure.Storage.Table.CloudTable.CreateIfNotExists。

CloudTableClient tableClient = cloudStorageAccount.CreateCloudTableClient();
            if (tableClient != null)
            {
                CloudTable table = tableClient.GetTableReference(reference);
                table.CreateIfNotExists();
                TableOperation insertOperation = TableOperation.Insert(entity);
                table.Execute(insertOperation);
                return true;
            }

和 WindowsAzure.Storage 包配置,

<package id="WindowsAzure.Storage" version="7.2.1" targetFramework="net461" />

最佳答案

将 nuget 更新到 WindowsAzure.Storage 9.3.3 https://www.nuget.org/packages/WindowsAzure.Storage/然后发布它应该可以工作的函数,确保在应用程序设置中配置了连接字符串。

关于c# - Azure 函数 - 在 Azure 存储中找不到方法,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54575130/

相关文章:

c# - 从任务回调到主线程

c# - emgu cv 能做到普通 open CV 能做到的一切吗?

image - 使用 terraform 从镜像创建 azure vm

azure - 依赖注入(inject)容器是否在同一个包中的 azure 函数之间共享?

azure - 如何将 "Storage Blob Data Reader"角色分配给 azure 中的用户/组?

azure - 如何从最新的 blob 文件夹 azure blob 容器中获取最新文件?

azure - 如何在微服务/无服务器架构中创建文件缓存层

c# - 在 Dictionary<string, Dictionary<string, int>> 上进行 linq 查询时出现问题

c# - 将 "ACCOUNTS\\"之后的隐蔽名称部分转换为小写?

azure - 如何在 azure 中配置可用性集?