.net – 加载Azure Storage 2.0时出错 – 无法加载Microsoft.Data.OData 5.0
我的托管服务使用Azure Storage 2.0(来自Nuget的2.0.5.1).在Visual Studio 2010下我没有问题.我切换到Visual Studio 2012,现在在我的主要Web角色的某个网站上,我得到以下类型的Microsoft. WindowsAzure.Storage.StorageException异常: Could not load file or assembly 'Microsoft.Data.OData,Version=5.0.2.0,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) 而Azure Storage 2.0.5.1需要Microsoft.Data.OData 5.2.0.0.其他工作者角色工作正常,他们似乎找到了正确的程序集.在每个项目中,Azure Storage 2.0都是从Nuget安装的,所有引用都指向packages文件夹. 我在.NET 4.0下使用Azure SDK 1.8 – 这意味着我还使用Azure Storage Client 1.7. 经过一番调查,我发现这个网站从SDK路径加载了Microsoft.WindowsAzure.Storage,我在其他程序集中加载了Microsoft.WindowsAzure.StorageClient的相同路径 – 在Visual Studio的Modules窗口中我可以看到iisexpress使用文件版本2.0.0.0加载程序集.据我所知,对Microsoft.WindowsAzure.StorageClient的引用可以强制Visual Studio从错误的路径加载Microsoft.WindowsAzure.Storage.经过一番摆弄后,我将Microsoft.WindowsAzure.Storage程序集移出SDK文件夹,强制Visual Studio引用Nuget下载的程序集 – 这样我没有问题. 另外一种选择,我也可以将Microsoft.WindowsAzure.StorageClient移动到另一个位置并更改我项目中的引用 – 但由于我打算完全迁移到Azure Storage 2.0,因此这将毫无用处(例如,我希望在Azure中SDK 2.0 Diagnostics使用Storage 2.0). (编辑:百色站长网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
- php在windows环境下获得cpu内存实时使用率(推荐)
- Windows – 如何将多个文件名传递给上下文菜单Shell命令?
- windows-10 – Windows 10移动设备错误:DEP6200
- WIN10家庭中文版远程提示要求的函数不支持 win10家庭版提示
- Windows下动态加载的库的地址范围
- winforms – .NET ListView和Windows 7
- Windows Azure表存储行大小限制小于规定的1MB
- 如何使用GUI独立于.NET或其他Libs为Windows制作便携式C程序
- JNA调用Dll的问题
- windows-phone-8 – 新的Live磁贴在Windows Phone Silverli
- windows – JScript:如何运行外部命令并获得输出
- .net – 如何通过webclient下载图像(jpg)并保存到
- Qt 5 QML应用程序,包含许多Windows或复杂的UI
- Windows Phone – 在Windows Phone 8中设置广告
- 无法找到MSVCP120D.DLL或0x00007启动错误的解决方
- wpf – Windows 8 XAML多列文本
- windows – dokan sshfs有多稳定?
- tfs – 在测试用例通过或失败时发送电子邮件警报
- windows – 为什么输出传输时某些“for”命令不起
- 为什么有条件地包含direct.h或sys / stat.h基于_