问题是System.Data.Services.Client.dll和Microsoft.Data.Services.Client.dll中都存在一些类(DataServiceClientException / DataServiceRequestException / DataServiceResponse).简单的方法是
use only one of those libraries.不幸的是:
>无法删除System.Data.Services.Client.dll,因为使用Microsoft.WindowsAzure.StorageClient.TableServicesContext是必需的
> Azure上的Microsoft.WindowsAzure.StorageClient.TableServicesContext需要Microsoft.Data.Services.Client.dll.
通常这两个库可以很好地协同工作.但是,实现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时如何检测并发更新冲突?
解决方法
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。