简体   繁体   English

Azure功能-在Azure存储中找不到方法

[英]Azure function- Method not found in azure storage

I am using azure table storage for saving data. 我正在使用azure表存储来保存数据。 And I want to create the method as azure function. 我想将该方法创建为azure函数。 When i locally debug, it's work fine. 当我在本地调试时,它工作正常。 When add it in azure function, I got exception error 将其添加到azure函数中时,出现异常错误

Method not found: 'Boolean Microsoft.WindowsAzure.Storage.Table.CloudTable.CreateIfNotExists. 找不到方法:'Boolean 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;
            }

And WindowsAzure.Storage package config, 和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/,然后发布您的函数,它应该可以工作,并确保在应用程序设置中配置了连接字符串。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM