问题
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.
回答1:
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..
回答2:
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.
回答3:
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.
回答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.
回答5:
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.
回答6:
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
来源:https://stackoverflow.com/questions/15252517/how-to-disable-wcf-test-client-vs-2012