title: Error : not supported in WCF Test client because it uses type System.Threading.Tasks
body: <p>I will post this question even though I see that there are few others similar to this one. However I am not able to find satisfying solution on either why I get this error nor how to solve it. </p>
  
  <p>So, today I had to host a service on my local computer for testing purposes. The service is a single WCF service solution and it's been working as far as I know for a long time. However when I downloaded the project and tried to host the service on my local machine I got the error from the title:</p>
  
  <blockquote>
    <p>This operation is not supported in the WCF Test Client because it uses type System.Threading</p>
  </blockquote>
  
  <p>So when I got back home I decided to make a service using some async methods and get to the bottom of this. However I was really surprised when I get this exact same error on almost empty project which is not using (or at least it seems so) the <code>System.Threading.Tasks</code> anywhere.</p>
  
  <p>So what I did:</p>
  
  <ul>
  <li>Created new <code>WCF Service</code> using Visual Studio 2013 default template</li>
  <li>Left the default <code>IService1.cs</code> file and <code>Service1.svc</code></li>
  <li><p>Changed the <code>IService1.cs</code> to :</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Runtime.Serialization;
  using System.ServiceModel;
  using System.ServiceModel.Web;
  using System.Text;
  
  namespace WcfService
  {
      [ServiceContract]
      public interface IService1
      {
          [OperationContract]
          int GetEmpId(int id);
      }
  }
  </code></pre>
  
  <ul>
  <li><p>Changed the <code>Service1.svc</code> to:</p>
  
  <p>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Runtime.Serialization;
  using System.ServiceModel;
  using System.ServiceModel.Web;
  using System.Text;</p>
  
  <p>namespace WcfService
  {
     public class Service1 : IService1
     {
        public int GetEmpId(int id)
        {
          return id;
        }
    }
  }</p></li>
  </ul></li>
  </ul>
  
  <p>And leaving the default <code>web.config</code> which looks like this:</p>
  
  <pre><code>&lt;system.serviceModel&gt;
      &lt;behaviors&gt;
        &lt;serviceBehaviors&gt;
          &lt;behavior&gt;
            &lt;!-- To avoid disclosing metadata information, set the values below to false before deployment --&gt;
            &lt;serviceMetadata httpGetEnabled="true" httpsGetEnabled="true"/&gt;
            &lt;!-- To receive exception details in faults for debugging purposes, set the value below to true.  Set to false before deployment to avoid disclosing exception information --&gt;
            &lt;serviceDebug includeExceptionDetailInFaults="false"/&gt;
          &lt;/behavior&gt;
        &lt;/serviceBehaviors&gt;
      &lt;/behaviors&gt;
      &lt;protocolMapping&gt;
          &lt;add binding="basicHttpsBinding" scheme="https" /&gt;
      &lt;/protocolMapping&gt;    
      &lt;serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" /&gt;
    &lt;/system.serviceModel&gt;
  </code></pre>
  
  <p>I haven't even tried to use <code>Task</code>, <code>Threading</code> or something like that, just wanted to see that my service is up and running so I can start adding things and see when exactly I'll get the error but for my surprise after setting <code>Service1.svc</code> as my startup class and trying to run the project I got the same error :</p>
  
  <blockquote>
    <p>This operation is not supported in the WCF Test Client because it uses type System.Threading</p>
  </blockquote>
  
  <p>Ok, now I'm completely lost. I was getting this error after several attempts to run my project. Just before posting this question I tried again and this time I didn't get the error. In fact I just finished my client and I'm able to consume the <code>GetEmpId()</code> method.</p>
  
  <p>So what is going on here. This is screenshot when I build my project:</p>
  
  <p><img src="https://i.stack.imgur.com/yd5UL.png" alt="Service"></p>
  
  <p>I don't have method <code>GetEmpIdAsync()</code>. I haven't tried to add it. And how it comes it won't build several times and now all of a sudden I'm able to use the method that I actually have implemented from the very beginning?</p>