The problem is that some classes (DataServiceClientException / DataServiceRequestException / DataServiceResponse) exist in both System.Data.Services.Client.dll and Microsoft.Data.Services.Client.dll. The simple approach would be to use only one of those libraries. Unfortunately:
- System.Data.Services.Client.dll cannot be removed because it is required for using Microsoft.WindowsAzure.StorageClient.TableServicesContext
- Microsoft.Data.Services.Client.dll is required for Microsoft.WindowsAzure.StorageClient.TableServicesContext on Azure.
Normally these two libraries work fine together. However, implementing the code from here to detect concurrency conflicts results in errors:
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'
because System.Data.Services.Client.DataServiceClientException
, DataServiceRequestException
, and DataServiceResponse
classes cannot be accessed as they exist in both libraries. How does one detect concurrency update conflicts while using Microsoft.WindowsAzure.StorageClient.TableServicesContext?