Q: Empty config file when referencing WCF in WP7 App I am trying to consume my own WCF service from a WP7 app.
The Config File in the WCF Service 
<?xml version="1.0"?>
<configuration>

  <system.web>
    <compilation debug="true"/>
  </system.web>  
  <system.serviceModel>
    <services>

      <service name="mergedServices.MergedService">

        <endpoint address="" binding="wsHttpBinding" contract="mergedServices.RelationGeneratorServiceInterface">
          <identity>
            <dns value="localhost" />
          </identity>
        </endpoint>

        <endpoint address="" binding="wsHttpBinding" contract="mergedServices.keywordSearchServiceInterface">
          <identity>
            <dns value="localhost" />
          </identity>
        </endpoint>

        <endpoint address="" binding="wsHttpBinding" contract="mergedServices.QAServiceInterface">
          <identity>
            <dns value="localhost" />
          </identity>
        </endpoint>

        <endpoint address="" binding="wsHttpBinding" contract="mergedServices.CompareWithOnePredicateInterface">
          <identity>
            <dns value="localhost" />
          </identity>
        </endpoint>

        <endpoint address="" binding="wsHttpBinding" contract="mergedServices.ComparisonServiceInterface">
          <identity>
            <dns value="localhost" />
          </identity>
        </endpoint>


        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
        <host>
          <baseAddresses>
            <add baseAddress="http://localhost:8732/Design_Time_Addresses/mergedServices/" />
          </baseAddresses>
        </host>
      </service>

    </services>
    <behaviors>
      <serviceBehaviors>
        <behavior>
          <!-- To avoid disclosing metadata information, 
          set the value below to false and remove the metadata endpoint above before deployment -->
          <serviceMetadata httpGetEnabled="True"/>
          <!-- 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 -->
          <serviceDebug includeExceptionDetailInFaults="False"/>
        </behavior>
      </serviceBehaviors>
    </behaviors>
  </system.serviceModel>

<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup></configuration>

When I reference the WCF service in a Console Client, the client Config file looks like this: 
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <system.serviceModel>
        <bindings>
            <wsHttpBinding>
                <binding name="WSHttpBinding_RelationGeneratorServiceInterface"
                    closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00"
                    sendTimeout="00:01:00" bypassProxyOnLocal="false" transactionFlow="false"
                    hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288"
                    maxReceivedMessageSize="65536" messageEncoding="Text" textEncoding="utf-8"
                    useDefaultWebProxy="true" allowCookies="false">
                    <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
                        maxBytesPerRead="4096" maxNameTableCharCount="16384" />
                    <reliableSession ordered="true" inactivityTimeout="00:10:00"
                        enabled="false" />
                    <security mode="Message">
                        <transport clientCredentialType="Windows" proxyCredentialType="None"
                            realm="" />
                        <message clientCredentialType="Windows" negotiateServiceCredential="true"
                            algorithmSuite="Default" />
                    </security>
                </binding>
                <binding name="WSHttpBinding_keywordSearchServiceInterface" closeTimeout="00:01:00"
                    openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
                    bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard"
                    maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
                    messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true"
                    allowCookies="false">
                    <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
                        maxBytesPerRead="4096" maxNameTableCharCount="16384" />
                    <reliableSession ordered="true" inactivityTimeout="00:10:00"
                        enabled="false" />
                    <security mode="Message">
                        <transport clientCredentialType="Windows" proxyCredentialType="None"
                            realm="" />
                        <message clientCredentialType="Windows" negotiateServiceCredential="true"
                            algorithmSuite="Default" />
                    </security>
                </binding>
                <binding name="WSHttpBinding_QAServiceInterface" closeTimeout="00:01:00"
                    openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
                    bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard"
                    maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
                    messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true"
                    allowCookies="false">
                    <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
                        maxBytesPerRead="4096" maxNameTableCharCount="16384" />
                    <reliableSession ordered="true" inactivityTimeout="00:10:00"
                        enabled="false" />
                    <security mode="Message">
                        <transport clientCredentialType="Windows" proxyCredentialType="None"
                            realm="" />
                        <message clientCredentialType="Windows" negotiateServiceCredential="true"
                            algorithmSuite="Default" />
                    </security>
                </binding>
                <binding name="WSHttpBinding_CompareWithOnePredicateInterface"
                    closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00"
                    sendTimeout="00:01:00" bypassProxyOnLocal="false" transactionFlow="false"
                    hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288"
                    maxReceivedMessageSize="65536" messageEncoding="Text" textEncoding="utf-8"
                    useDefaultWebProxy="true" allowCookies="false">
                    <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
                        maxBytesPerRead="4096" maxNameTableCharCount="16384" />
                    <reliableSession ordered="true" inactivityTimeout="00:10:00"
                        enabled="false" />
                    <security mode="Message">
                        <transport clientCredentialType="Windows" proxyCredentialType="None"
                            realm="" />
                        <message clientCredentialType="Windows" negotiateServiceCredential="true"
                            algorithmSuite="Default" />
                    </security>
                </binding>
                <binding name="WSHttpBinding_ComparisonServiceInterface" closeTimeout="00:01:00"
                    openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
                    bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard"
                    maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
                    messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true"
                    allowCookies="false">
                    <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
                        maxBytesPerRead="4096" maxNameTableCharCount="16384" />
                    <reliableSession ordered="true" inactivityTimeout="00:10:00"
                        enabled="false" />
                    <security mode="Message">
                        <transport clientCredentialType="Windows" proxyCredentialType="None"
                            realm="" />
                        <message clientCredentialType="Windows" negotiateServiceCredential="true"
                            algorithmSuite="Default" />
                    </security>
                </binding>
            </wsHttpBinding>
        </bindings>
        <client>
            <endpoint address="http://localhost:8732/Design_Time_Addresses/mergedServices/"
                binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_RelationGeneratorServiceInterface"
                contract="ServiceReference1.RelationGeneratorServiceInterface"
                name="WSHttpBinding_RelationGeneratorServiceInterface">
                <identity>
                    <dns value="localhost" />
                </identity>
            </endpoint>
            <endpoint address="http://localhost:8732/Design_Time_Addresses/mergedServices/"
                binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_keywordSearchServiceInterface"
                contract="ServiceReference1.keywordSearchServiceInterface"
                name="WSHttpBinding_keywordSearchServiceInterface">
                <identity>
                    <dns value="localhost" />
                </identity>
            </endpoint>
            <endpoint address="http://localhost:8732/Design_Time_Addresses/mergedServices/"
                binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_QAServiceInterface"
                contract="ServiceReference1.QAServiceInterface" name="WSHttpBinding_QAServiceInterface">
                <identity>
                    <dns value="localhost" />
                </identity>
            </endpoint>
            <endpoint address="http://localhost:8732/Design_Time_Addresses/mergedServices/"
                binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_CompareWithOnePredicateInterface"
                contract="ServiceReference1.CompareWithOnePredicateInterface"
                name="WSHttpBinding_CompareWithOnePredicateInterface">
                <identity>
                    <dns value="localhost" />
                </identity>
            </endpoint>
            <endpoint address="http://localhost:8732/Design_Time_Addresses/mergedServices/"
                binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_ComparisonServiceInterface"
                contract="ServiceReference1.ComparisonServiceInterface" name="WSHttpBinding_ComparisonServiceInterface">
                <identity>
                    <dns value="localhost" />
                </identity>
            </endpoint>
        </client>
    </system.serviceModel>
</configuration>

The problem is when I try to consume the WCF service from a WP7 project, When I reference the service, this is what's inside the config file:
<configuration />

and that's it ......... 
and When I start the app, the following runtime error appears:
System.Collections.Generic.KeyNotFoundException was unhandled
  Message=KeyNotFoundException
  StackTrace:
       at System.ThrowHelper.ThrowKeyNotFoundException()
       at System.Collections.Generic.Dictionary`2.get_Item(String key)
       at System.ServiceModel.Configuration.ServiceModelSectionGroup.get_Client()
       at System.ServiceModel.Description.ConfigLoader.LookupChannel(String configurationName, String contractName, Boolean wildcard)
       at System.ServiceModel.Description.ConfigLoader.LoadChannelBehaviors(ServiceEndpoint serviceEndpoint, String configurationName)
       at System.ServiceModel.ChannelFactory.ApplyConfiguration(String configurationName)
       at System.ServiceModel.ChannelFactory.InitializeEndpoint(String configurationName, EndpointAddress address)
       at System.ServiceModel.ChannelFactory`1..ctor(String endpointConfigurationName, EndpointAddress remoteAddress)
       at System.ServiceModel.ChannelFactory`1..ctor(String endpointConfigurationName)
       at System.ServiceModel.EndpointTrait`1.CreateSimplexFactory()
       at System.ServiceModel.EndpointTrait`1.CreateChannelFactory()
       at System.ServiceModel.ClientBase`1.CreateChannelFactoryRef(EndpointTrait`1 endpointTrait)
       at System.ServiceModel.ClientBase`1.InitializeChannelFactoryRef()
       at System.ServiceModel.ClientBase`1..ctor()
       at MergedServicesConsumer.WeetitService.QAServiceInterfaceClient..ctor()
       at MergedServicesConsumer.MainPage.button1_Click(Object sender, RoutedEventArgs e)
       at System.Windows.Controls.Primitives.ButtonBase.OnClick()
       at System.Windows.Controls.Button.OnClick()
       at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)
       at System.Windows.Controls.Control.OnMouseLeftButtonUp(Control ctrl, EventArgs e)
       at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String eventName)

The referencing should return the config file after the binding, I'm not sure what goes wrong, I am not hosting the WCF on IIS, I'm just running the project of the WCF library in the background during trial of the WP7 app on the Emulator.

A: The windows phone 7's run time is silverlight, which does NOT support WSHttpBinding. You have to change your service binding to basicHttpBinding, the only binding that silverlight project supports. :(
The KeyNotFoundException is due to the default binding (BasicHttpBinding) not exist in the service's binding list (Only WSHttpBinding found in your service).
If you can't or you don't want to touch the original WSHttpBinding configured WCF service, you can still workaround it by taking the advantage of the adapter design pattern.
I met this exact issue when I develop Windows Phone application that consume a WSHttpBinding WCF service. Finally I had to implement an adapter WCF service which itself is BasicHttpBinding configured and consume the original WSHttpBinding service. And then make the Windows Phone application to consume the adapter service instead.
Though this adapter approach needs some additional work, it's still a graceful workaround solution.

A: I faced the same issue. What I did was :
 1. Right click on the service reference.
 2. Select "Configure Service Reference..."
 3. No need to change anything on the dialog that appears.
 4. Click "Ok" on the dialog.
This regenerated the "ServiceReferences.ClientConfig" file for me.
Hope this will help.

A: To consume the WCF service from windows phone 8 project on vs2013, I faced the same problem (Empty config client), and I could not create an instance of the client Service reference.
The following worked for me:
1- Right-click on the referenced service under the folder ServiceRefernce.
2- Select Configure Service Reference in the menu to  access Service Reference Settings.
3- Above the list of assemblies, Select "Reuse types in specified referenced assemblies:".
4- Check in the list "System.ServiceModel" and press OK.
I hope this will help.
