How can I disable WcfSvcHost?
When we create a WCF application using some of the built-in WCF project templates (such as WCF Service Library) in Visual Studio 2008, a project type Guid (3D9AD99F-2412-4246-B90B-4EAA41C64699) is added to the PropertyTypeGuids element in the project file. When we debug a project that has this type Guid, Visual Studio runs WcfSvcHost.exe, which auto-hosts our service for debugging and testing purposes.

This is a useful feature if we want to get our service up and running quickly but we really want to use our own host application at some point so we need to be able to disable this functionality (ideally we should be able to switch it on/off). Nicholas Allen wrote a blog entry showing how to do this manually by editing the project file and removing the type Guid mentioned above. He also referred to an upcoming feature in Visual Studio 2008 SP1, which allows us to toggle this setting using the GUI.
So this is how this feature works in Visual Studio 2008 SP1 Beta. In the project properties window, an additional tab called "WCF Options" is displayed for those projects that have the WCF magic type Guid.

This tab has a checkbox entitled "Start WCF Service Host when debugging another project in the same solution" and this item is checked by default. This means Visual Studio will start WcfSvcHost.exe even if we are debugging another (let's say a console) application we want to use as our service host.


If we uncheck this box, WcfSvcHost.exe will be started only if we choose to debug our WCF Service Library project and it will not run when we debug the console application (which is our service host).


This is great as we don't have to edit the project file manually and we can easily switch this feature on/off.