小编Jar*_*red的帖子

无法从 Azure 函数中的 Blob 存储读取文件

我正在尝试使用 Azure Function App 从 Blob 存储读取文本文件。我的目标是读取 CSV 文件,并将其重新格式化为新的 CSV,并添加原始 CSV 文件中没有的其他详细信息。

我不断收到以下编译错误:

2018-11-28T00:22:34.125 [Error] run.csx(60,19): error CS1061: 'CloudBlockBlob' does not contain a definition for 'DownloadToStream' and no extension method 'DownloadToStream' accepting a first argument of type 'CloudBlockBlob' could be found (are you missing a using directive or an assembly reference?) 
Run Code Online (Sandbox Code Playgroud)

我可以将代码的 Blob 存储部分复制到控制台应用程序的项目中,它会编译得很好。

我缺少参考吗?

这是减去 Blob 存储连接字符串的完整函数。

#r "Newtonsoft.Json"

#r "System.Configuration"
#r "System.Data"

#r "System.Collections"
#r "System.IO.Compression"
#r "System.Net"
#r "Microsoft.WindowsAzure.Storage"
#r "System.Linq"

using System.Net;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Primitives; …
Run Code Online (Sandbox Code Playgroud)

.net c# azure azure-storage-blobs azure-functions

3
推荐指数
1
解决办法
7185
查看次数

标签 统计

.net ×1

azure ×1

azure-functions ×1

azure-storage-blobs ×1

c# ×1