简体   繁体   中英

Could not load file or assembly 'Microsoft.Data.OData, Version=5.6.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies

I have the error "could not load 'Microsoft.Data.OData, Version=5.6.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies."

I have all the binding redirects in place to version 5.7.0.0, however at run time the azure instance can not find the Microsoft.Data.OData, Version=5.6.4.0!

I was able to RDP to the instance and look with .net reflector, and loading my service dll from azure instance (E:\\approot\\bin), it seems I have one assemblies depending on this Microsoft.Data.OData, Version=5.6.4.0 which is Microsoft.Azure.Storage.dll; in .net reflector all assemblies load fine with no dependency errors. however the azure instance wants to load the old version of Microsoft.Data.OData, Version=5.6.4.0. I have all assembly bindings in place.

any idea how can I continue this investigation? what else should I look for in understanding why the azure instance is not seeing my binding redirect?

a somewhat similar problem reported here but with no answer to the kind of problem I am facing: Could not load file or assembly Microsoft.Data.OData Version=5.2.0.0 error in Azure Cloud Worker Role using Table Storage

EDIT: right now I can't even RDP anymore, all I can see is the diagnostic summary and there I can see the same error as above.

So indeed it seems like the bind redirect is ignored fully... or only for this assembly?... can you please give me some advise how should I investigate further? I do not have access to the azure instance (I might be able to access it later... I was able to do it today at some point)

thank you very much

and to answer my question: pfeeewww. because the webrole lives in two processes (see this https://www.simple-talk.com/content/article.aspx?article=2211 and this http://dzimchuk.net/post/be-aware-of-web-role-host-process ) any of the binding redirects defined were not affecting the webrole.cs code but only the web app code. doh! so... I have two options: either move all the code from webrole.cs to web app code or create special/separate binding redirects for webrole.cs

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.

Related Question 'Could not load file or assembly 'Microsoft.ServiceBus, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies Could not load file or assembly 'Microsoft.Owin, Version=2.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies Could not load file or assembly 'WebGrease, Version=1.5.1.25624, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies Could not load file or assembly 'System.Web.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies Could not load file or assembly 'Microsoft.CodeAnalysis, version= 1.3.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependenc Could not load file or assembly 'Microsoft.Owin, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' Could not load file or assembly 'Microsoft.Owin, Version=2.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 Could not load file or assembly 'Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' Could not load file or assembly 'Microsoft.Practices.EnterpriseLibrary.Common, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or Could not load file or assembly 'System.Web.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM