Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WCF Service Library vs Class Library project types

Tags:

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?

like image 234
kenwarner Avatar asked Mar 12 '10 18:03

kenwarner


People also ask

What is the difference between WCF Service library and WCF Service application?

The major difference is that the WCF Service Application has a . svc file, whereas the WCF Service Library does not have a . svc file. Suppose we want to host this service application in IIS, then you need to specify for IIS the execution runtime environment requirements.

How to create WCF Service library project?

Open Visual Studio. On the start window, choose Create a new project. Type wcf service library in the search box on the Create a new project page. Select either the C# or Visual Basic template for WCF Service Library, and then click Next.

What is WCF Service Library?

The WCF Service Application template can be used to create WCF services with a hosting website created within the project. The WCF Service Library template can be used to create WCF services that are hosted by the WCF Service Host, and these can be tested using the WCF service Test Client.


1 Answers

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
like image 153
kenwarner Avatar answered Oct 08 '22 19:10

kenwarner