title: Referencing a Wcf Tcp service from within the same solution
body: <p>I am going through the walkthrough "How to: Use netTcpBinding with Windows Authentication and Transport Security in WCF Calling from Windows Forms"</p>
  
  <p><a href="http://msdn.microsoft.com/en-us/library/ff647180.aspx" rel="nofollow noreferrer">http://msdn.microsoft.com/en-us/library/ff647180.aspx</a></p>
  
  <p>When I get to "Step 7: Create a Test Client Application" and substep 5: "5.In the Add Service Reference dialog box, set the Service URI: to net.tcp://localhost:8523/WCFTestService and then click Go"</p>
  
  <p>I get "The URI prefix is not recognized.  Metadata contains a reference that cannot be resolved".</p>
  
  <p>It's as if the "Add Service Reference" doesn't recognize the "net.tcp" binding.</p>
  
  <p>I'm on Windows 7 x64 using Visual Studio 2012 and my project is targeting x86 and Framework 4.5.</p>
  
  <p>I found this thread</p>
  
  <p><a href="https://stackoverflow.com/questions/12761107/an-error-in-the-msdn-walk-through-how-to-host-wcf-in-a-windows-service-using">An error in the MSDN walk-through - &quot;How to: Host WCF in a Windows Service Using TCP&quot;</a></p>
  
  <p>But they didn't have a problem when the client was in the same solution.  I am.</p>
  
  <p>Service Config:</p>
  
  <pre><code>    &lt;system.serviceModel&gt;
      &lt;behaviors&gt;
          &lt;serviceBehaviors&gt;
              &lt;behavior name="Publisher.MyServiceBehavior"&gt;
                  &lt;serviceMetadata httpGetEnabled="false" httpsGetEnabled="false" /&gt;
                  &lt;serviceDebug includeExceptionDetailInFaults="false" /&gt;
              &lt;/behavior&gt;
          &lt;/serviceBehaviors&gt;
      &lt;/behaviors&gt;
      &lt;services&gt;
          &lt;service name="POC_WcfTcpSubscribePublishService.Publisher"&gt;
              &lt;endpoint address="" binding="netTcpBinding" bindingConfiguration=""
                  name="NetTcpBindingEndpoint" contract="POC_WcfTcpSubscribePublishService.IPublisher"&gt;
                  &lt;identity&gt;
                      &lt;dns value="localhost" /&gt;
                  &lt;/identity&gt;
              &lt;/endpoint&gt;
              &lt;endpoint address="mex" binding="mexTcpBinding" bindingConfiguration=""
                  name="MexTcpBindingEndpoint" contract="IMetadataExchange" /&gt;
              &lt;host&gt;
                  &lt;baseAddresses&gt;
                      &lt;add baseAddress="net.tcp://localhost:8523/WcfTcpSubscribePublish" /&gt;
                  &lt;/baseAddresses&gt;
              &lt;/host&gt;
          &lt;/service&gt;
      &lt;/services&gt;
  &lt;/system.serviceModel&gt;
  </code></pre>
  
  <p>any pointers are welcome.</p>