WCF Service in Visual Studio "locking up" for a minute

When you build a WCF service using Visual Studio 2008 using the WCF Service Library project template, Visual Studio automatically hosts the service library using the WcfSvcHost.exe application. However, when you're simply hosting this service in another service host (like IIS) you don't need this WcfSvcHost.

To make this even more annoying, if the service configuration is incorrect (why would you want to fix something you're not using anyway???) you will see this warning when starting to debug "The target assembly contains no service types. etc...":


This is actually caused by the WcfSvcHost searching your assembly for service types...

There is an easy way to get rid of this, simply delete the app.config file in the service library. You don't need config files in service libraries anyway. Beware, there might be useful configuration information like connection strings, so copy these over to your host's config before deleting.

I tried simply deleting the service configuration from the config file, but the tool still insists in you configuring the service, so this doesn't help. If you still need a .config file in your service library, avoid the WCF Service Library template, use the normal library project instead and add references to System.ServiceModel and System.Runtime.Serialization.

Or you can try to delete the following line from your project:


This deletes the WcfSvcHost from starting.