Microsoft.Data.Services.Client.dll 与 System.Data.Services.Client.dll [英] Microsoft.Data.Services.Client.dll vs System.Data.Services.Client.dll

查看:17
本文介绍了Microsoft.Data.Services.Client.dll 与 System.Data.Services.Client.dll的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 WCF 数据服务并且有点困惑我应该参考什么库来与 WCF 数据服务交互:Microsoft.Data.Services.Client.dllSystem.Data.Services.Client.dll.

I'm trying to use WCF Data Services and a little confused what library should I reference to interact with WCF Data Services: Microsoft.Data.Services.Client.dll or System.Data.Services.Client.dll.

它们之间有什么区别?在哪种情况下我应该使用它们中的每一个?

尝试添加对它们的引用时,出现编译器错误:

When trying to add references to both of them I get a compiler error:

类型'System.Data.Services.Client.DataServiceContext'存在于 'e:Program FilesWCF数据服务 2011 年 3 月CTP2in.NETFrameworkMicrosoft.Data.Services.Client.dll'和 'e:Program FilesReference程序集MicrosoftFramework.NETFrameworkv4.0System.Data.Services.Client.dll'

The type 'System.Data.Services.Client.DataServiceContext' exists in both 'e:Program FilesWCF Data Services Mar 2011 CTP2in.NETFrameworkMicrosoft.Data.Services.Client.dll' and 'e:Program FilesReference AssembliesMicrosoftFramework.NETFrameworkv4.0System.Data.Services.Client.dll'

推荐答案

System.Data.Services.Client.dll 是 .NET 3.5 及更高版本附带的基本框架的一部分.Microsoft.Data.Services.Client.dll 是此库的更新版本(从您的目录路径我看到您使用的是 2011 年 3 月的 CTP),它还不是基本 .NET 安装包的一部分,包含任何新功能自基础版本发布以来.

System.Data.Services.Client.dll is part of the base framework that ships with .NET 3.5 and upwards. The Microsoft.Data.Services.Client.dll is an updated version of this library (from your directory paths I see you're using the March 2011 CTP) which is not yet part of the base .NET installation package and contains any new features since the base release.

因此,如果您想使用一些最新的功能,包括 Microsoft dll.如果您只是追求基本功能(安装了适当的 .NET 框架的任何东西都将 100% 支持),请使用系统 dll.

So if you're looking to use some of the latest features include the Microsoft dll. If you're just after base functionality (that will be 100% supported by anything with the proper .NET framework installed) use the System dll.

这是一篇博客文章,概述了 Microsoft 和 System 命名空间之间的区别:http://blogs.msdn.com/b/brada/archive/2008/11/16/what-does-that-net-namespace-mean-system-and-microsoft.aspx

Here's a blog article outlining the difference between the Microsoft and System namespaces: http://blogs.msdn.com/b/brada/archive/2008/11/16/what-does-that-net-namespace-mean-system-and-microsoft.aspx

这篇关于Microsoft.Data.Services.Client.dll 与 System.Data.Services.Client.dll的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆