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

老子叫甜甜 提交于 2019-12-13 01:41:47

问题


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


回答1:


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



来源:https://stackoverflow.com/questions/36331296/could-not-load-file-or-assembly-microsoft-data-odata-version-5-6-4-0-culture

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!