.net Microsoft.Azure.Storage.Common出现问题

.net Microsoft.Azure.Storage.Common出现问题,.net,azure-storage-blobs,.net,Azure Storage Blobs,我一直在为一些web应用程序使用WindowsAzure.Storage。在.NET Framework 4.8中,它被标记为已弃用。我试图用Microsoft.Azure.Storage.Common和Microsoft.Azure.Storage.Blob替换它,这对于我的目的应该足够了。以下是我的代码: var account=GetCloudStorageAccount(); var blobClient=account.CreateCloudBlobClient(); var blob

我一直在为一些web应用程序使用WindowsAzure.Storage。在.NET Framework 4.8中,它被标记为已弃用。我试图用
Microsoft.Azure.Storage.Common
Microsoft.Azure.Storage.Blob
替换它,这对于我的目的应该足够了。以下是我的代码:

var account=GetCloudStorageAccount();
var blobClient=account.CreateCloudBlobClient();
var blobContainerName=容器名称;
var container=blobClient.GetContainerReference(blobContainerName);
var blob=container.GetBlobReference(名称);
blob.DownloadToStream(outputStream);
当我尝试用新软件包运行它时,我得到了

Exception Type: Microsoft.Azure.Storage.StorageException
Exception Message: BeginWrite is not supported
Exception Source: Microsoft.Azure.Storage.Common

有解决方案吗?

看起来您已更新到不推荐的版本。
Microsoft.Azure.Storage.Common
Microsoft.Azure.Storage.Blob

已被以下新的Azure SDK取代

与Azure存储服务交互的最新库包括:

建议您转到新软件包

迁移到
Azure.Storage.Blobs
以使用最新的包与Azure中的Blobs交互