Microsoft.Data.Services.Client.dll vs System.Data.Services.Client.dll
Asked Answered
F

2

12

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'

Fowler answered 24/4, 2011 at 20:20 Comment(0)
H
23

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

Heliostat answered 25/4, 2011 at 5:48 Comment(0)
D
0

If you do need to use system.data.services and system.data.services.client, make sure to explicitly remove the microsoft variants i.e. right-clicking references -> right click and remove the microsoft ones.

Derrik answered 20/1, 2016 at 17:49 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.