Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

System.IO.FileLoadException - Could not load file or Assembly Microsoft.WindowsAzure.Storage

Tags:

c#

.net

azure

I have a web service that downloads a file from a Windows Azure Service Bus. However as soon as I call the method that connects to azure to download the file I get the following error.

An exception of type 'System.IO.FileLoadException' occurred in MyWebService.dll but was not handled in user code

Additional information: Could not load file or assembly 'Microsoft.WindowsAzure.Storage, Version=3.1.0.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

I have checked the versions of azure I am using and all are version 3.1.0.1.

enter image description here

like image 412
Ben Sharpe Avatar asked Nov 11 '22 09:11

Ben Sharpe


1 Answers

I think the Problem in your case is Windows is blocking the DLL from being referenced . You need to first "Unblock" it first and then add Refernce ..

Refer this link : Could not load assembly, Exception from HRESULT: 0x80131040

like image 109
spetzz Avatar answered Nov 14 '22 23:11

spetzz