繁体   English   中英

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

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

我最近尝试将网站部署到使用Azure存储的Windows Azure网站服务。 部署后,我收到来自Storage SDK的以下错误,该错误似乎引用了尚不存在的程序集版本。 我无法在任何地方找到此版本的DLL文件。 有什么建议?

无法加载文件或程序集'Microsoft.Data.Services.Client,Version = 5.6.0.0,Culture = neutral,PublicKeyToken = 31bf3856ad364e35'或其依赖项之一。 该系统找不到指定的文件。

存储客户端库依赖于此程序集,不幸的是,当您通过Nuget安装库时,它不会自动下载。 你需要亲自拿到这个包。 您可以从此处下载此软件包: http//www.nuget.org/packages/Microsoft.Data.Services.Client/

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

我最终删除了存储,安装了5.6.0版本,然后重新安装

  UnInstall-Package WindowsAzure.Storage

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

  Install-Package WindowsAzure.Storage

同意StressChicken。 这里的东西是最新的WindowsAzure.Storage默认安装Services.Client 5.6.1,由于某种原因会抛出异常。 只需在WindowsAzure.Storage之前安装Service.Client 5.6.0。 然后WindowsAzure.Storage将使用已安装的5.6.0来解决依赖关系。

从Visual Studio 2013发布到Azure时,安装上面的nuGet包仍然没有帮助。我不得不通过FTP手动将Microsoft.Data.Services.Client.dll上传到bin文件夹到Azure。 希望对某人也有所帮助。

我发现我必须卸载WindowsAzure.Storage和Microsoft.Data.Services.Client。 然后(使用Package Manager Console)我安装了特定版本的Microsoft.Data.Services.Client:

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

然后安装特定版本的WindowsAzure.Storage:

Install-Package WindowsAzure.Storage -Version 2.1.0.4

如果我将以下内容添加到相应项目的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>

我只是切换回WindowsAzure.Storage 3.1.0并修复了问题。 最新版本的WindowsAzure.Storage 3.1.0.1存在问题

PM>安装包WindowsAzure.Storage -Version 3.1.0

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

暂无
暂无

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM