Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Microsoft.Data.Services.Client.dll vs 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.

What is the difference between them? In which case should I use each of them?

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

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'

like image 444
rem Avatar asked Apr 24 '11 20:04

rem


1 Answers

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.

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.

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

like image 169
David Klemke Avatar answered Oct 23 '22 21:10

David Klemke