title: VS2012 Add Service Reference not updating config file
body: <p>I have created a new IIS hosts WCF service using the <a href="http://msdn.microsoft.com/en-us/library/system.servicemodel.webhttpbinding.aspx" rel="nofollow noreferrer">webHttpBinding</a> which is currently running on on IIS Express on my development machine and when I try to "Add Service Reference" the service is correctly built and the Reference.cs file looks fine but the web.config or app.config files are not being updated.</p>
  
  <p>No warnings or error messages are received.</p>
  
  <p>Both the service and the client are targeting .Net 4.5.</p>
  
  <p><strong>Service config</strong></p>
  
  <pre><code>  &lt;system.serviceModel&gt;
      &lt;bindings&gt;
        &lt;webHttpBinding&gt;
          &lt;binding name="webInteropSecureBinding" allowCookies="false" maxBufferPoolSize="2097152" maxBufferSize="2097152" maxReceivedMessageSize="2097152"&gt;
            &lt;security mode="Transport" /&gt;
          &lt;/binding&gt;
        &lt;/webHttpBinding&gt;
      &lt;/bindings&gt;
      &lt;services&gt;
        &lt;service name="PsmDataProvider.PsmProvider" behaviorConfiguration="SecureRest"&gt;
          &lt;clear /&gt;
          &lt;endpoint address="" binding="webHttpBinding" bindingConfiguration="webInteropSecureBinding" name="PsmProvider" contract="PsmDataProvider.IPsmProvider" listenUriMode="Explicit" behaviorConfiguration="webHttpBehavior" /&gt;
          &lt;endpoint address="mex" binding="mexHttpsBinding" name="mex" contract="IMetadataExchange" listenUriMode="Explicit" /&gt;
          &lt;host&gt;
            &lt;baseAddresses&gt;
              &lt;add baseAddress="https://localhost:44300/PsmProvider/" /&gt;
            &lt;/baseAddresses&gt;
          &lt;/host&gt;
        &lt;/service&gt;
      &lt;/services&gt;
      &lt;behaviors&gt;
        &lt;serviceBehaviors&gt;
          &lt;behavior name="SecureRest"&gt;
            &lt;serviceMetadata httpGetEnabled="false" httpsGetEnabled="true" /&gt;
            &lt;serviceDebug includeExceptionDetailInFaults="true" /&gt;
          &lt;/behavior&gt;
        &lt;/serviceBehaviors&gt;
        &lt;endpointBehaviors&gt;
          &lt;behavior name="webHttpBehavior"&gt;
            &lt;webHttp /&gt;
          &lt;/behavior&gt;
        &lt;/endpointBehaviors&gt;
      &lt;/behaviors&gt;
      &lt;serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" /&gt;
    &lt;/system.serviceModel&gt;
  </code></pre>
  
  <p><strong>Client Config</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt;
  &lt;configuration&gt;
      &lt;startup&gt; 
          &lt;supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" /&gt;
      &lt;/startup&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p><strong>Client Service Reference</strong></p>
  
  <p><img src="https://i.stack.imgur.com/gBDLD.png" alt="enter image description here"></p>
  
  <p>Following some investigation I found these StackOverflow questions</p>
  
  <p><a href="https://stackoverflow.com/questions/4621523/when-adding-wcf-service-reference-configuration-details-are-not-added-to-web-co">Question 1</a></p>
  
  <p><a href="https://stackoverflow.com/questions/2159107/visual-studio-does-not-generate-app-config-content-when-add-service-reference">Question 2</a></p>
  
  <p><a href="https://stackoverflow.com/questions/2159107/visual-studio-does-not-generate-app-config-content-when-add-service-reference">Question 3</a></p>
  
  <p>And this post</p>
  
  <p><a href="http://thomashundley.com/post/2011/12/07/WCF-Service-References-not-generating-webconfig-client-endpoints-and-bindings.aspx" rel="nofollow noreferrer">Blog post</a></p>
  
  <p>Each of the above refer to the same problem of unticking the "Reuse types in references assemblies" flag which I have done.</p>
  
  <p><img src="https://i.stack.imgur.com/CBfew.png" alt="enter image description here"></p>
  
  <p>The problem is it did not fix the issue. I have tried updating and deleting and recreating the service reference but it never updates the config file.</p>
  
  <p><strong>Question</strong></p>
  
  <p>Is this a problem with the server side configuration? Or is this an issue with the client side? How to I change either so that the proxy generation works as expected?</p>