Press "Enter" to skip to content

Tips for enabling WCF test client

There are two ways to open the WCF test client outside of Visual Studio: The first method is to double-click on the path to it (Visual Studio installation path \Common7\IDE\WcfTestClient.exe). The second method is to enter the “WcfTestClient” command in the “Visual Studio Command Prompt”, a

ifferent project templates for Visual Studio provide different WCF test client startup methods. The following table is a project template related to WCF in Visual Studio 2010 Beta2:

Project template name Template location .NET Frameworkversion
WCF service library New Project -> WCF Node 3.0/3.5/4.0
WCF service application New Project -> Web Node 3.0/3.5/4.0
WCF Workflow Service Application New Project -> WCF Node 4.0
WF order service New Project -> WCF Node 3.5
WF state machine service New Project -> WCF Node 3.5
Joint service library New Project -> WCF Node 3.5/4.0
WCF service New website 3.0/3.5/4.0

Table 1

WCF Service Library , WF Order Service , WF State Machine Service :

Enable debugging (F5) will start the WCF service host (WCF Service Host) hosted project by default, and will automatically enable the WCF test client,

 If you want F5, do not start the WCF test client, you can modify the project properties -> debug -> command line parameters, 

WCF service application , WCF workflow service application :

When in the “Solution Explorer”, the focus is selected in the .svc or .xamlx file for a particular service, F5 will launch the WCF test client.

If you want to always start IE in F5, you can disable the WCF test client by adding the EnableWcfTestClientForSVC property configuration in the .csproj.user file:

<Project>

  <ProjectExtensions>

    <VisualStudio>

      <FlavorProperties>

        <WebProjectProperties>

          <EnableWcfTestClientForSVC>False</EnableWcfTestClientForSVC>

        </WebProjectProperties>

      </FlavorProperties>

    </VisualStudio>

  </ProjectExtensions>

</Project>

    In addition, there is a default value setting for the EnableWcfTestClientForSVC property in the .csproj file. If the .csproj.user file does not have a setting for this property, then the property uses the default value in the .csproj file:

<Project>

  <ProjectExtensions>

    <VisualStudio>

      <FlavorProperties>

        <WebProjectProperties>

         <EnableWcfTestClientForSVCDefaultValue>False</EnableWcfTestClientForSVCDefaultValue>

        </WebProjectProperties>

      </FlavorProperties>

    </VisualStudio>

  </ProjectExtensions>

</Project>

The following table shows the logical relationship between the settings of the .csproj.user and .csproj file related properties and the startup client type:

.csproj.user

File settings

True False Not set Not set Not set
.csproj

File settings

True/False/ not set True/False/ not set True False Not set
start up

Client type

WCF test client IE WCF test client IE IE

Table 2

For example, in a project group that uses source control, the .csproj.user file will not be shared, and the .csproj file will be shared. If you only want to change the startup behavior of your individual WCF test client, you should modify the .csproj.user file; if you want to change the startup behavior of everyone who develops the project, you should modify the .csproj file.

Joint Service Library :

The WCF test client does not test this service, so the FCF test client is not automatically started when F5.

WCF service (website) :

    The WCF test client is not automatically started when F5. If you want to get the same startup behavior as the WCF service application , you can modify the C:\Users\<username>\AppData\Local\Microsoft\WebsiteCache\websites.xml file (the files in the XP/2003 system are in similar locations):

<DesignTimeData>

  <Website RootUrl=”C:\” CacheFolder=”WCFService1″ EnableWcfTestClientForSVC=”true” />

</DesignTimeData>

    Note that you should close Visual Studio before modifying the websites.xml file, otherwise the overlay websites.xml file will be overwritten when Visual Studio is closed.

91 Comments

  1. Oybrjo Oybrjo January 21, 2024

    purchase azithromycin pill azipro price buy azipro 250mg generic

  2. Szpiegowskie Telefonu Szpiegowskie Telefonu January 30, 2024

    Dzięki programowi monitorowania rodziców rodzice mogą zwracać uwagę na czynności wykonywane przez ich dzieci na telefonie komórkowym oraz łatwiej i wygodniej monitorować wiadomości WhatsApp. Aplikacja działa cicho w tle urządzenia docelowego, nagrywając wiadomości konwersacyjne, emotikony, pliki multimedialne, zdjęcia i filmy. Dotyczy każdego urządzenia z systemem Android i iOS.

  3. Szpiegowskie Telefonu Szpiegowskie Telefonu February 11, 2024

    Jeśli myślisz o użyciu aplikacji szpiegowskiej na telefon komórkowy, dokonałeś właściwego wyboru.

  4. Iffcyi Iffcyi March 14, 2024

    buy ciprofloxacin pills for sale – cost bactrim buy augmentin generic

Leave a Reply

Your email address will not be published. Required fields are marked *