Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
507 views
in Technique[技术] by (71.8m points)

wcf - 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 FilesWCF Data Services Mar 2011 CTP2in.NETFrameworkMicrosoft.Data.Services.Client.dll' and 'e:Program FilesReference AssembliesMicrosoftFramework.NETFrameworkv4.0System.Data.Services.Client.dll'

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...