How to prevent Visual Studio from launching WcfSvcHost.exe while debugging?

I have a solution in Visual Studio 2008 which has multiple projects. One of the projects is a WCF project. Sometimes I just want to debug other projects, but when I press F5, Visual Studio has wcfsvchost.exe launched to host the WCF project even it is not "StartUp Project".

Currently, every time I debugging other projects, I Have to Unload the WCF project to prevent the annoying WcfSvcHost.exe host pop up. However, it is not convenient. Anybody know better idea to prevent WCF project to be hosted in debugging mode?


Solution 1:

Go to WCF Options section in the property page of your WCF project and unselect the check box that says 'Start WCF Service Host when debugging another project in the same solution'.

Solution 2:

If you have created a WCF Project, and then change it to a Console project, and find that the WCF Service Host is still being launched, edit the project and edit the ProjectTypeGuids to remove the WCF Project type:

Old:

<ProjectTypeGuids>{3D9AD99F-2412-4246-B90B-4EAA41C64699};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>

New:

<ProjectTypeGuids>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>