WCF Service Library vs Class Library project types

kenwarner picture kenwarner · Mar 12, 2010 · Viewed 11.1k times · Source

What does a WCF Service Library do that a regular class library doesn't?

Edit: I posted my own answer. Am I missing anything? Are they fundamentally both just class libraries with a few template classes added?

Answer

kenwarner picture kenwarner · Mar 12, 2010

I created both and compared. This is what I found.

WCF Service Library

  • adds references to System.Runtime.Serialization and System.ServiceModel. does not contain a reference to System.Data.DataSetExtensions as the Class Library does.
  • contains sample service classes IService1, CompositeType and Service1
  • adds app.config with a wsHttpBinding and a mexHttpBinding service endpoint
  • adds /client:"WcfTestClient.exe" as a debug command line option in the project properties
  • adds a WCF Options tab in the project properties. This tab contains an option to start a WCF service host when debugging another project in the same solution
  • enables a Sign the ClickOnce manifests option in the Signing tab of the project properties. this option is disabled in the Class Library