How to disable WCF Test Client - VS 2012
Asked Answered
O

6

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://mcmap.net/q/518118/-wcf-how-to-disable-wcf-test-client 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.

Ocko answered 6/3, 2013 at 16:17 Comment(6)
try this. You need to remove command line from Debug parameters.Yelp
Thank you for your answer, but that option is not available in WCF Service Application (this option is only for Service Library).Ocko
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"Yelp
Your project file has EnableWcfTestClientForSVC node? In Visual Studio 2012? Mine does not, checked 3-4 times to make sure.Ocko
By default it does not have,but it can be added, and after that it works (ie does not start wcftestclient).Yelp
anybody found the answer for this please?Forced
O
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.

Ocko answered 11/10, 2013 at 21:1 Comment(1)
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!Schuster
G
35

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..

Goatskin answered 24/4, 2013 at 11:52 Comment(1)
Adding the property (it was missing entirely) to csproj file in VS2019 worked for me.Khasi
M
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.

Mouthpart answered 13/12, 2013 at 20:56 Comment(0)
O
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.

Ocko answered 11/10, 2013 at 21:1 Comment(1)
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!Schuster
P
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.

Pennsylvanian answered 23/4, 2016 at 16:30 Comment(1)
Only problem is the VS open only the localhost:port not the localhost:port/foobar.svcSamos
D
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.

Deventer answered 15/10, 2015 at 20:4 Comment(0)
D
-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

Disengage answered 23/9, 2013 at 12:31 Comment(1)
Not sure what this has to do with my question.Ocko

© 2022 - 2024 — McMap. All rights reserved.