問題是System.Data.Services.Client.dll和Microsoft.Data.Services.Client中都存在一些類(DataServiceClientException/DataServiceRequestException/DataServiceResponse)。 DLL。簡單的方法是use only one of those libraries。不幸的是:使用Microsoft.WindowsAzure.StorageClient.TableServicesContext並檢測併發更新衝突
- System.Data.Services.Client.dll不能使用,因爲它需要使用Microsoft.WindowsAzure.StorageClient.TableServicesContext
- Microsoft.Data.Services.Client.dll需要微軟刪除。 Azure上的WindowsAzure.StorageClient.TableServicesContext。
通常這兩個庫一起工作良好。然而,從here執行代碼來檢測併發衝突會導致錯誤:
Error 1 The type 'System.Data.Services.Client.DataServiceRequestException' exists in both 'C:\Program Files\Microsoft WCF Data Services\5.0\bin\.NETFramework\Microsoft.Data.Services.Client.dll' and 'C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Data.Services.Client.dll'
Error 2 The type 'System.Data.Services.Client.DataServiceResponse' exists in both 'C:\Program Files\Microsoft WCF Data Services\5.0\bin\.NETFramework\Microsoft.Data.Services.Client.dll' and 'C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Data.Services.Client.dll'
Error 3 The type 'System.Data.Services.Client.DataServiceClientException' exists in both 'C:\Program Files\Microsoft WCF Data Services\5.0\bin\.NETFramework\Microsoft.Data.Services.Client.dll' and 'C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Data.Services.Client.dll'
,因爲他們在這兩個庫中存在System.Data.Services.Client.DataServiceClientException
,DataServiceRequestException
和DataServiceResponse
類不能被訪問。在使用Microsoft.WindowsAzure.StorageClient.TableServicesContext時,如何檢測併發更新衝突?