简体   繁体   中英

Could not load file or assembly Microsoft.WindowsAzure.Storage, Version=8.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 or one of its depend

I am using Azure function which reads from an Azure Service Bus Queue and write to Azure blob storage as a part of the message processing.

The Blob writing is done using the azure-storage-net-data-movement library.

The logic for processing the message and writing to the blob sits in different projects that the Azure Function project.

While writing to the blog, I'm constantly getting

System.IO.FileNotFoundException: 'Could not load file or assembly 'Microsoft.WindowsAzure.Storage, Version=8.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.'

Tried changing all projects to .Net 4.6/.1/.2, installing the Microsoft.NET.Sdk.Functions 1.0.5 updates but no luck.

Getting the same error running locally as well as in the cloud. When I read from the queue using a console application the same solution works as expected.

Any suggestions?

Thanks Mikhail for pointing me to the right direction.

Function SDK is using 7.2.1 version of Storage library, whereas the data movement library depends on >= 8.4.0. So the fix was to simply add the package WindowsAzure.Storage, Version=8.5.0.0 to the Azure function project.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM