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?
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.
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.
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.
I created both and compared. This is what I found.
WCF Service Library
System.Runtime.Serialization
and System.ServiceModel
. does not contain a reference to System.Data.DataSetExtensions
as the Class Library does.IService1
, CompositeType
and Service1
/client:"WcfTestClient.exe"
as a debug command line option in the project propertiesWCF Options
tab in the project properties. This tab contains an option to start a WCF service host when debugging another project in the same solutionSign the ClickOnce manifests
option in the Signing tab of the project properties. this option is disabled in the Class LibraryIf you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With