title: WCF Service Reference Support Files Not Updating
body: <p>I have a VS 2010 solution containing a WCF service project and a unit test project.  The unit test project has a service reference to the WCF service.</p>
  
  <p>Web.config for the WCF service project sets a number of binding attributes to other-than-default values:</p>
  
  <p><strong>web.config:</strong> (Specifically note maxBufferSize="<strong>20000000</strong>")</p>
  
  <pre><code>&lt;basicHttpBinding&gt;
      &lt;binding name="basicHttpBindingConfig" maxReceivedMessageSize="20000000" maxBufferSize="20000000" maxBufferPoolSize="20000000"&gt;
        &lt;readerQuotas maxDepth="32" maxArrayLength="200000000" maxStringContentLength="200000000"/&gt;
        &lt;security mode="TransportCredentialOnly"&gt;
          &lt;transport clientCredentialType="Ntlm"/&gt;
        &lt;/security&gt;
      &lt;/binding&gt;
  &lt;/basicHttpBinding&gt;
  </code></pre>
  
  <p>While examining <a href="https://stackoverflow.com/questions/7524183/sending-larger-object-to-wcf-results-in-400-bad-request">this issue</a>, I came to realize that the unit test project's service reference support files do not contain the values I would expect (i.e. the values configured in the WCF service's web.config):</p>
  
  <p><strong>configuration.svcinfo:</strong>
  (Specifically note <em>maxBufferSize</em>=&quot;<strong>65536</strong>&quot;)</p>
  
  <pre><code>  &lt;binding hostNameComparisonMode="StrongWildcard" maxBufferSize="65536" messageEncoding="Text" name="BasicHttpBinding_IBishopService" textEncoding="utf-8" transferMode="Buffered"&gt;
      &lt;readerQuotas maxArrayLength="16384" maxBytesPerRead="4096" maxDepth="32" maxNameTableCharCount="16384" maxStringContentLength="8192" /&gt;
      &lt;security mode="None"&gt;
        &lt;message algorithmSuite="Default" clientCredentialType="UserName" /&gt;
        &lt;transport clientCredentialType="None" proxyCredentialType="None" realm="" /&gt;
      &lt;/security&gt;
    &lt;/binding&gt;
  </code></pre>
  
  <p>Deleting and re-creating the service reference or updating the service reference re-creates the files, but I still end up with the same values.</p>
  
  <p>Why?</p>
  
  <p><strong>Update</strong></p>
  
  <p>Here's the <strong>app.config</strong> of the client</p>
  
  <pre><code>&lt;binding name="BasicHttpBinding_IMyService" closeTimeout="00:01:00"
                      openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
                      allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
                      maxBufferSize="200000000" maxBufferPoolSize="200000000" maxReceivedMessageSize="200000000"
                      messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
                      useDefaultWebProxy="true"&gt;
                      &lt;readerQuotas maxDepth="32" maxStringContentLength="200000000" maxArrayLength="200000000"
                          maxBytesPerRead="200000000" maxNameTableCharCount="200000000" /&gt;
                      &lt;security mode="None"&gt;
                          &lt;transport clientCredentialType="None" proxyCredentialType="None"
                              realm="" /&gt;
                          &lt;message clientCredentialType="UserName" algorithmSuite="Default" /&gt;
                      &lt;/security&gt;
                  &lt;/binding&gt;
  </code></pre>