17

I have a new WCF Service Application, when I hit F5 to debug, the WCF Test Client always comes up, but I would like to disable it since I am using soapUI to test instead.

I have tried the answer here - https://stackoverflow.com/a/8441887/903056 but this XML node is no longer in the project file for VS 2012. I have tried several other things myself as well, such as changing default start page and trying to force debug to start a browser session instead.

Community
  • 1
  • 1
EkoostikMartin
  • 6,591
  • 2
  • 30
  • 60
  • try [this](http://stackoverflow.com/a/8441879/649524). You need to remove command line from Debug parameters. – Tilak Mar 06 '13 at 16:19
  • Thank you for your answer, but that option is not available in WCF Service Application (this option is only for Service Library). – EkoostikMartin Mar 06 '13 at 16:22
  • I have tried, the link you have shared, and it has disabled wcftestclient. To enable soapui, you can explore -> "Right click on WCF project"->"Web"->"Start Action"->"Start External Program" – Tilak Mar 06 '13 at 16:34
  • Your project file has `EnableWcfTestClientForSVC` node? In Visual Studio 2012? Mine does not, checked 3-4 times to make sure. – EkoostikMartin Mar 06 '13 at 16:44
  • By default it does not have,but it can be added, and after that it works (ie does not start wcftestclient). – Tilak Mar 07 '13 at 03:12
  • anybody found the answer for this please? – Max Oct 02 '13 at 21:00

6 Answers6

32

This is realy frustrated but you can try one of the followings to disable the WCF test client:

1.Open the requested project properties and select the Web tab. Select the Current Page radio button (I believe that the Specific Page button is selected), Save the project and run(F5).

2.You can modified the prject XML (.csproj) file and add

<EnableWcfTestClientForSVCDefaultValue>False</EnableWcfTestClientForSVCDefaultValue>

attribute to <WebProjectProperties> node. That should be done by the followings:

2.1 Unload the requested project (right click -> Unload Project).

2.2 Edit <ProjectName>.csproj (right click again on the project)

2.3 Look for WebProjectProperties node and add <EnableWcfTestClientForSVCDefaultValue>False</EnableWcfTestClientForSVCDefaultValue> to it.

2.4 Reload the poject.

I hope you will find that unswer helpfull..

user622505
  • 683
  • 5
  • 23
Liran Ben Yehuda
  • 1,438
  • 3
  • 12
  • 23
20

A simple option that works for me (at least in Visual Studio 2012 Update 4):

Open the WCF project properties and go to the Web section. Set the Start Action setting to Don't open a page. Wait for a request from an external application.

After choosing that option I no longer see the WCF Test Client.

I personally usually choose this start action anyway, since I much prefer hitting F5 in my browser than having yet another tab opened each time I hit F5 in VS.

Nick
  • 3,062
  • 2
  • 21
  • 17
5

I found a reasonable work around. All I did was add an empty html page to the project, then right clicked on the html file in Solution Explorer and chose Set As Start Page. A debug session starts but it doesn't go to the WCF TestClient. Not elegant but works.

EkoostikMartin
  • 6,591
  • 2
  • 30
  • 60
  • This is maddening, but works fine. I had an old VS2010 WCF Rest Starter Kit service line I just needed to support for a bit and this answer was a huge help. Thanks! – Ian Patrick Hughes Jun 19 '14 at 22:29
4

Old thread but found it while I was suffering the same frustration with VS2013. If you run the project (F5) with the (yourProject)\svc.cs file open in the VS editor then the WCF Client starts. If you hit F5 with any other file as the selected and focused file in the VS editor then IIS and the normal first web page starts. Very simple when one knows.

ChrisH
  • 61
  • 1
0

I had a similar problem, and found this to be caused by the default Start Options under

> Solution Properties
    > Debug
        >Start Options
            >Command line arguemnts:  

it was listing a command line argument of /client:"WcfTestClient.exe" which was launching the test client. Simply removing this argument solved my problem.

Joseph Nields
  • 4,903
  • 2
  • 24
  • 44
-1

No need to extra thing just do thing below.

Tools-->Option -->project and solution-->Build and Run and finally check Only startup project and Dependencies on Run

Karu
  • 111
  • 1
  • 1
  • 3