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

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

问题描述

我试图使用 WCF数据服务,有点混淆我应该参考什么库来与WCF数据服务交互: Microsoft.Data.Services.Client.dll System.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 Files\WCF
数据服务2011年3月
CTP2\bin.NETFramework\Microsoft.Data.Services.Client.dll'
和'e:\Program Files\Reference
装配\Microsoft\Framework.NETFramework\v4.0\System.Data.Services.Client.dll'

The type 'System.Data.Services.Client.DataServiceContext' exists in both 'e:\Program Files\WCF Data Services Mar 2011 CTP2\bin.NETFramework\Microsoft.Data.Services.Client.dll' and 'e:\Program Files\Reference Assemblies\Microsoft\Framework.NETFramework\v4.0\System.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天全站免登陆