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".
我在Visual Studio 2008中有一个有多个项目的解决方案。其中一个项目是WCF项目。有时我只想调试其他项目,但是当我按F5时,Visual Studio启动wcfsvchost.exe来托管WCF项目,即使它不是“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?
目前,每次我调试其他项目时,我都要卸载WCF项目以防止恼人的WcfSvcHost.exe主机弹出。但是,这不方便。有人知道更好的想法阻止WCF项目在调试模式下托管吗?
4 个解决方案
#1
41
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'.
转到WCF项目的属性页中的WCF选项部分,并取消选中“在同一解决方案中调试另一个项目时启动WCF服务主机”复选框。
#2
20
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:
如果您已创建WCF项目,然后将其更改为Console项目,并发现仍在启动WCF服务主机,请编辑项目并编辑ProjectTypeGuids以删除WCF项目类型:
Old:
旧:
<ProjectTypeGuids>{3D9AD99F-2412-4246-B90B-4EAA41C64699};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
New:
新:
<ProjectTypeGuids>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
#3
4
You could try to unload the WCF project in the solution, then debug.
您可以尝试在解决方案中卸载WCF项目,然后进行调试。
Sorry it was late I misread the last part to fast, then the only other way, that I know of, is to comment out the web parts in the Property Group of the project. This prevented the pop-up for me
对不起,我迟到了,我误读了最后一部分要快,那么我所知道的另一种方法就是在项目的属性组中注释掉网页部分。这阻止了我弹出窗口
Unload the project, Comment out the mentioned part, reload.
卸载项目,注释掉提到的部分,重新加载。
<!--<PublishUrl>http://localhost/WindowsFormsApplication1/</PublishUrl>
<Install>true</Install>
<InstallFrom>Web</InstallFrom>
<UpdateEnabled>true</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>true</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>-->
#4
1
Not sure if this would fix your issue or not, but if you click on the WCF project in solution explorer, see if it has a "Always Start When Debugging" property. If it does, set it to false. That property only shows up for some project types though, so it depends on exactly what type of project template you used.
不确定这是否会解决您的问题,但如果您单击解决方案资源管理器中的WCF项目,请查看它是否具有“始终在调试时启动”属性。如果是,请将其设置为false。该属性仅显示某些项目类型,因此它取决于您使用的项目模板的确切类型。
#1
41
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'.
转到WCF项目的属性页中的WCF选项部分,并取消选中“在同一解决方案中调试另一个项目时启动WCF服务主机”复选框。
#2
20
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:
如果您已创建WCF项目,然后将其更改为Console项目,并发现仍在启动WCF服务主机,请编辑项目并编辑ProjectTypeGuids以删除WCF项目类型:
Old:
旧:
<ProjectTypeGuids>{3D9AD99F-2412-4246-B90B-4EAA41C64699};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
New:
新:
<ProjectTypeGuids>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
#3
4
You could try to unload the WCF project in the solution, then debug.
您可以尝试在解决方案中卸载WCF项目,然后进行调试。
Sorry it was late I misread the last part to fast, then the only other way, that I know of, is to comment out the web parts in the Property Group of the project. This prevented the pop-up for me
对不起,我迟到了,我误读了最后一部分要快,那么我所知道的另一种方法就是在项目的属性组中注释掉网页部分。这阻止了我弹出窗口
Unload the project, Comment out the mentioned part, reload.
卸载项目,注释掉提到的部分,重新加载。
<!--<PublishUrl>http://localhost/WindowsFormsApplication1/</PublishUrl>
<Install>true</Install>
<InstallFrom>Web</InstallFrom>
<UpdateEnabled>true</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>true</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>-->
#4
1
Not sure if this would fix your issue or not, but if you click on the WCF project in solution explorer, see if it has a "Always Start When Debugging" property. If it does, set it to false. That property only shows up for some project types though, so it depends on exactly what type of project template you used.
不确定这是否会解决您的问题,但如果您单击解决方案资源管理器中的WCF项目,请查看它是否具有“始终在调试时启动”属性。如果是,请将其设置为false。该属性仅显示某些项目类型,因此它取决于您使用的项目模板的确切类型。