Dot-Net

在 Visual Studio 中關閉 WCF 服務主機

  • April 5, 2012

可能重複:

如何防止 Visual Studio 在 Debuggin 中啟動 WcfSvcHost.exe?

當我使用 WCF 服務庫調試解決方案時,VS 2008 預設啟動 WCF 服務主機。有沒有辦法關閉它,以便我可以使用自己的託管 Windows 服務主機?

請按照以下步驟禁用測試 WCF 客戶端:

  1. 編輯 .csproj 文件,並找到ProjectTypeGuids元素。
  2. 消除{3D9AD99F-2412-4246-B90B-4EAA41C64699};
  3. 保存 .csproj 文件並在 Visual Studio 中重新載入項目。

只需"Start WCF Service Host when debugging another project in the same solution"在項目設置中取消選中 WCF 選項中的複選框

引用自:https://stackoverflow.com/questions/5366229