Search code examples
azure-storageazure-blob-storageazure-storage-queues

Microsoft.Azure.Storage.Blob v11.1.7 throws exception while creating Queueclient


While using "Microsoft.Azure.Storage.Blob" Version="11.1.7"

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

Above line of code throws below exception "message": "Method 'get_NetworkTimeout' in type 'Microsoft.Azure.Storage.Queue.QueueRequestOptions' from assembly 'Microsoft.Azure.Storage.Queue, Version=11.1.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' does not have an implementation.",

if you replace "Microsoft.Azure.Storage.Blob" Version="11.1.7" with Version="11.1.1" no exception & working as expected. Why?


Solution

  • I guess the version of the Microsoft.Azure.Storage.Queue you used is 11.1.1. I used the Microsoft.Azure.Storage.Blob Version=11.1.7 and Microsoft.Azure.Storage.Queue Version=11.1.1 which can reproduce your problem.

    So the root cause is that Microsoft.Azure.Storage.Blob Version=11.1.7 and Microsoft.Azure.Storage.Queue Version=11.1.1 seem to conflict with each other.

    Solution:
    You can use Microsoft.Azure.Storage.Blob Version=11.1.7 and Microsoft.Azure.Storage.Queue Version=11.1.7, or Microsoft.Azure.Storage.Blob Version=11.1.1 and Microsoft.Azure.Storage.Queue Version=11.1.1, then you will solve this problem.