.net - Error in loading Azure Storage 2.0 -- could not load Microsoft.Data.OData 5.0.2 -


my hosted service uses azure storage 2.0 (exactly 2.0.5.1 nuget). under visual studio 2010 had no problem. switched visual studio 2012 , in web site of main web role following exception of type microsoft.windowsazure.storage.storageexception:

could not load file or assembly 'microsoft.data.odata, version=5.0.2.0, culture=neutral, publickeytoken=31bf3856ad364e35' or 1 of dependencies. located assembly's manifest definition not match assembly reference. (exception hresult: 0x80131040) 

while azure storage 2.0.5.1 requires microsoft.data.odata 5.2.0.0 . other worker roles work fine , seem find correct assembly. in every project azure storage 2.0 installed nuget , references point packages folder.

i use azure sdk 1.8 under .net 4.0 -- means employ azure storage client 1.7.

after little investigation, discovered web site loaded microsoft.windowsazure.storage sdk path, same path loaded microsoft.windowsazure.storageclient in other assemblies -- in modules windows in visual studio can see iisexpress loads assembly file version 2.0.0.0 . understanding reference microsoft.windowsazure.storageclient can force visual studio load microsoft.windowsazure.storage wrong path.

after bit of fiddling, i've moved microsoft.windowsazure.storage assembly out of sdk folder, forcing visual studio reference assembly downloaded nuget -- way had no problem.

an alternative, move microsoft.windowsazure.storageclient location , change references in project -- quite useless since plan move azure storage 2.0 entirely (for example, hope in azure sdk 2.0 diagnostics uses storage 2.0).


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

javascript - Clean way to programmatically use CSS transitions from JS? -

android - send complex objects as post php java -