无法加载文件或程序集“Microsoft.Data.OData,版本=5.6.4.0,文化=中性,PublicKeyToken=31bf3856ad364e35"或其依赖项之一 [英] Could not load file or assembly 'Microsoft.Data.OData, Version=5.6.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies
问题描述
我遇到错误无法加载 'Microsoft.Data.OData, Version=5.6.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' 或其依赖项之一."
I have the error "could not load 'Microsoft.Data.OData, Version=5.6.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies."
我已将所有绑定重定向到版本 5.7.0.0,但是在运行时,azure 实例找不到 Microsoft.Data.OData,版本 = 5.6.4.0!
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!
我能够 RDP 到实例并使用 .net 反射器查看,并从 azure 实例 (E:approotin) 加载我的服务 dll,看来我有一个依赖于这个 Microsoft.Data.OData 的程序集,Version=5.6.4.0 即 Microsoft.Azure.Storage.dll;在 .net 反射器中,所有程序集都可以正常加载,没有依赖项错误.但是 azure 实例想要加载旧版本的 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:approotin), 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.
知道如何继续调查吗?为了理解为什么 azure 实例没有看到我的绑定重定向,我还应该寻找什么?
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?
这里报告了一个有点类似的问题,但没有解决我面临的问题:无法加载文件或程序集 Microsoft.Data.OData Version=5.2.0.0 error in Azure Cloud Worker Role using Table Storage
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
现在我什至不能再使用 RDP,我只能看到诊断摘要,在那里我可以看到与上面相同的错误.
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.
所以确实似乎绑定重定向被完全忽略了...还是仅针对此程序集?...你能给我一些建议,我应该如何进一步调查?我无权访问 azure 实例(我可能稍后可以访问它...我今天在某个时候能够访问它)
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)
非常感谢
推荐答案
并回答我的问题:pfeeewww.因为 webrole 存在于两个进程中(请参阅此 https://www.simple-talk.com/content/article.aspx?article=2211 和这个http://dzimchuk.net/post/be-aware-of-web-role-host-process) 定义的任何绑定重定向都不会影响 webrole.cs 代码,而只会影响 Web 应用程序代码.哦!所以...我有两个选择:要么将所有代码从 webrole.cs 移动到 Web 应用程序代码,要么为 webrole.cs 创建特殊/单独的绑定重定向
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
这篇关于无法加载文件或程序集“Microsoft.Data.OData,版本=5.6.4.0,文化=中性,PublicKeyToken=31bf3856ad364e35"或其依赖项之一的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!