![](/img/trans.png)
[英]ambiguous reference to System.Data.Services.Client and Microsoft.Data.Services.Client
[英]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.