Microsoft.Azure.Storage.Blob v11.1.7在创建QueueClient时引发异常

时间:2020-07-01 08:35:28

标签: azure-storage azure-storage-blobs azure-storage-queues

使用“ Microsoft.Azure.Storage.Blob” Version =“ 11.1.7”

 var queue = storageAccount.CreateCloudQueueClient()
                .GetQueueReference(QueueName);

上面的代码行引发异常以下 “消息”:“程序集'Microsoft.Azure.Storage.Queue,版本= 11.1.1.1.0,区域性=中性,PublicKeyToken = 31bf3856ad364e35'中类型'Microsoft.Azure.Storage.Queue.QueueRequestOptions'中的方法'get_NetworkTimeout'没有实现。”,

如果将“ Microsoft.Azure.Storage.Blob” Version =“ 11.1.7”替换为Version =“ 11.1.1”,没有例外,并且按预期运行。为什么?

1 个答案:

答案 0 :(得分:0)

我猜您使用的Microsoft.Azure.Storage.Queue的版本是11.1.1。我使用了Microsoft.Azure.Storage.Blob版本= 11.1.7Microsoft.Azure.Storage.Queue版本= 11.1.1,它们可以重现您的问题。

因此,根本原因是Microsoft.Azure.Storage.Blob版本= 11.1.7Microsoft.Azure.Storage.Queue版本= 11.1.1似乎相互冲突。

解决方案:
您可以使用Microsoft.Azure.Storage.Blob版本= 11.1.7Microsoft.Azure.Storage.Queue版本= 11.1.7,或Microsoft.Azure.Storage.Blob版本= 11.1.1Microsoft.Azure.Storage.Queue Version = 11.1.1,那么您将解决此问题。

相关问题