简体   繁体   English

Azure网站上缺少Microsoft.Data.Services.Client 5.6版

[英]Missing Microsoft.Data.Services.Client version 5.6 on Azure Websites

I've recently tried to deploy a website to the Windows Azure websites service which utilizes Azure Storage. 我最近尝试将网站部署到使用Azure存储的Windows Azure网站服务。 Upon deployment, I received the following error coming from the Storage SDK, which seems to reference a version of an assembly that doesn't yet exist. 部署后,我收到来自Storage SDK的以下错误,该错误似乎引用了尚不存在的程序集版本。 I have not been able to find this version of the DLL file anywhere. 我无法在任何地方找到此版本的DLL文件。 Any suggestions? 有什么建议?

Could not load file or assembly 'Microsoft.Data.Services.Client, Version=5.6.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. 无法加载文件或程序集'Microsoft.Data.Services.Client,Version = 5.6.0.0,Culture = neutral,PublicKeyToken = 31bf3856ad364e35'或其依赖项之一。 The system cannot find the file specified. 该系统找不到指定的文件。

Storage client library has a dependency on this assembly and unfortunately it's not downloaded automatically when you install the library through Nuget. 存储客户端库依赖于此程序集,不幸的是,当您通过Nuget安装库时,它不会自动下载。 You would need to get this package yourself. 你需要亲自拿到这个包。 You can download this package from here: http://www.nuget.org/packages/Microsoft.Data.Services.Client/ . 您可以从此处下载此软件包: http//www.nuget.org/packages/Microsoft.Data.Services.Client/

For more information, please read the comments on this blog post from storage team: http://blogs.msdn.com/b/windowsazurestorage/archive/2013/11/27/windows-azure-storage-release-introducing-cors-json-minute-metrics-and-more.aspx . 有关更多信息,请阅读存储团队在此博客文章中的评论: http//blogs.msdn.com/b/windowsazurestorage/archive/2013/11/27/windows-azure-storage-release-introducing-cors- json-minute-metrics-and-more.aspx

I ended up removing storage, installing the 5.6.0 version and then re-installing 我最终删除了存储,安装了5.6.0版本,然后重新安装

  UnInstall-Package WindowsAzure.Storage

  Install-Package Microsoft.Data.Services.Client -Version 5.6.0

  Install-Package WindowsAzure.Storage

Agree with StressChicken. 同意StressChicken。 The thing here is the latest WindowsAzure.Storage will install Services.Client 5.6.1 by default, which will throw exception for some reason. 这里的东西是最新的WindowsAzure.Storage默认安装Services.Client 5.6.1,由于某种原因会抛出异常。 just install Service.Client 5.6.0 before WindowsAzure.Storage. 只需在WindowsAzure.Storage之前安装Service.Client 5.6.0。 Then WindowsAzure.Storage will use the installed 5.6.0 to resolve dependency. 然后WindowsAzure.Storage将使用已安装的5.6.0来解决依赖关系。

Installing the nuGet package above still didn't help me when publishing to Azure from Visual Studio 2013. I had to manually upload the Microsoft.Data.Services.Client.dll to the bin folder via FTP to Azure. 从Visual Studio 2013发布到Azure时,安装上面的nuGet包仍然没有帮助。我不得不通过FTP手动将Microsoft.Data.Services.Client.dll上传到bin文件夹到Azure。 Hope that helps someone as well. 希望对某人也有所帮助。

I found I had to uninstall WindowsAzure.Storage and Microsoft.Data.Services.Client. 我发现我必须卸载WindowsAzure.Storage和Microsoft.Data.Services.Client。 Then (using Package Manager Console) I installed the specific version of Microsoft.Data.Services.Client: 然后(使用Package Manager Console)我安装了特定版本的Microsoft.Data.Services.Client:

Install-Package Microsoft.Data.Services.Client -Version 5.6.0

and then installed a specific version of WindowsAzure.Storage: 然后安装特定版本的WindowsAzure.Storage:

Install-Package WindowsAzure.Storage -Version 2.1.0.4

Found it resolved the issue for me if I added the following to the appropriate project's app.config: 如果我将以下内容添加到相应项目的app.config中,它发现它解决了我的问题:

  <dependentAssembly>
    <assemblyIdentity name="Microsoft.Data.Services.Client" publicKeyToken="31bf3856ad364e35" culture="neutral" />
    <bindingRedirect oldVersion="0.0.0.0-5.6.3.0" newVersion="5.6.3.0" />
  </dependentAssembly>
  <dependentAssembly>
    <assemblyIdentity name="Microsoft.Data.Edm" publicKeyToken="31bf3856ad364e35" culture="neutral" />
    <bindingRedirect oldVersion="0.0.0.0-5.6.3.0" newVersion="5.6.3.0" />
  </dependentAssembly>
  <dependentAssembly>
    <assemblyIdentity name="Microsoft.Data.OData" publicKeyToken="31bf3856ad364e35" culture="neutral" />
    <bindingRedirect oldVersion="0.0.0.0-5.6.3.0" newVersion="5.6.3.0" />
  </dependentAssembly>

I simply switched back to WindowsAzure.Storage 3.1.0 and that fixed the problem. 我只是切换回WindowsAzure.Storage 3.1.0并修复了问题。 There is a problem with the latest version of WindowsAzure.Storage 3.1.0.1 最新版本的WindowsAzure.Storage 3.1.0.1存在问题

PM> Install-Package WindowsAzure.Storage -Version 3.1.0 PM>安装包WindowsAzure.Storage -Version 3.1.0

将WindowsAzure.Storage升级到v.4.2.0后,此问题已消失

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 对System.Data.Services.Client和Microsoft.Data.Services.Client的模糊引用 - ambiguous reference to System.Data.Services.Client and Microsoft.Data.Services.Client 运行 WCF 数据服务时出现 Microsoft.Data.Services 版本问题 - Microsoft.Data.Services version issue while running WCF Data Services 设置EntityFramework 6和WCF数据服务5.6 - Setting up EntityFramework 6 and WCF Data Services 5.6 运行时错误:无法加载文件或程序集&#39;Microsoft.Owin,版本= 3.0.0.0…Azure移动服务 - Runtime error: Could not load file or assembly 'Microsoft.Owin, Version=3.0.0.0…Azure mobile services 无法从程序集 Microsoft.Azure.Services.AppAuthentication 加载类型 Microsoft.Azure.Services.AppAuthentication.SqlAppAuthenticationProvider - Could not load type Microsoft.Azure.Services.AppAuthentication.SqlAppAuthenticationProvider from assembly Microsoft.Azure.Services.AppAuthentication “您必须添加对程序集'System.Data.Services.Client,Version = 3.5.0.0'的引用” - “You must add a reference to assembly 'System.Data.Services.Client, Version=3.5.0.0'” Microsoft.Azure.Documents.Client CreateDocumentQuery Moq - Microsoft.Azure.Documents.Client CreateDocumentQuery Moq Windows Phone 8 Azure移动服务-使我保持登录状态(Microsoft帐户) - Windows Phone 8 Azure Mobiles Services - Keep me signed in (Microsoft Account) Roslyn编译器版本用于缺少Microsoft.Net.Compilers的项目 - Roslyn compiler version used for projects missing Microsoft.Net.Compilers 无法加载文件或程序集&#39;Microsoft.Xrm.Client,版本错误 - Could not load file or assembly 'Microsoft.Xrm.Client, Version ERROR
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM