0

azurite mac 支持本地仿真CloudTable吗?azurite 适用于 anEventGridTrigger但不是CloudTable.

使用 azure 函数来处理 azure 存储:

[FunctionName("...")]
public static async Task<IActionResult> Run(
            [HttpTrigger ...,
            [Table("Name", "PK", "RK")] ...,
            [Table("Name")] CloudTable tableOut)

并在 Visual Studio For Mac 中启动函数之前运行 azurite:

azurite -s -l /tmp/azurite -d /tmp/azurite/debug.log

该函数无法启动并出现以下错误:

Microsoft.Azure.WebJobs.Extensions.Storage: Can't bind Table to type 'Microsoft.WindowsAzure.Storage.Table.CloudTable
4

2 回答 2

0

原来最新的azurite不支持表格:

V3 目前只支持 Blob 和 Queue 服务,Table 服务请暂时使用 V2。

sudo npm install -g azurite@2.7.0

但这也不起作用。

于 2020-08-20T10:50:30.330 回答
0

CloudTable 工作,Azurite 表服务现在处于预览状态,从版本 3.12.00 开始:https ://github.com/Azure/Azurite/releases/tag/v3.12.0

避免使用烦人的 Azurite 文件使存储库混乱的一个好方法是在 docker 容器中运行 Azurite(请参阅https://github.com/Azure/Azurite#DockerHub)。

docker run -p 10000:10000 -p 10001:10001 -p 10002:10002 mcr.microsoft.com/azure-storage/azurite
于 2021-09-06T12:19:17.407 回答