title: Built and referenced assembly not found with WCF
body: <h2>Background</h2>
  
  <p>I have a WCF-enabled project <code>MyService</code> which has a reference to a set of models in project <code>MyModel</code> and references a running service <code>http://example.com/endpoint.svc</code>. All three projects are in the same solution.</p>
  
  <h2>Issue</h2>
  
  <p>When I edit the Service Reference Settings in the <code>MyService</code> project I get the following error:</p>
  
  <blockquote>
    <p>Custom tool warning: The assembly 'Namespace.MyModel' could not be found.  Ensure that the assembly is referenced.  If the assembly is part of the current development project, ensure that the project has been built.</p>
  </blockquote>
  
  <p>The assembly is both built and referenced.</p>
  
  <p>This causes the issue that WCF generates additional classes which conflict with the existing ones in <code>MyModel</code>.</p>
  
  <h2>Attempted solutions</h2>
  
  <p>This issue seems similar to one talked about in <a href="https://social.msdn.microsoft.com/Forums/silverlight/en-US/06e9d364-f3bc-415f-b6e3-37e172dce502/error-adding-service-reference?forum=silverlightweb" rel="nofollow">this MSDN forum thread</a> however the suggested solution (which amounts to restarting Visual Studio and service) doesn't work.</p>
  
  <p>I have also tried removing and re-adding the reference, additionally combined with a Visual Studio restart.</p>
  
  <h2>TL;DR</h2>
  
  <p><strong>How can I fix this issue of WCF not being able to see the assembly?</strong></p>
  
  <hr>
  
  <h2>Additional information</h2>
  
  <h3>Service Reference Settings</h3>
  
  <p>The Service Reference Settings are set up as follows:</p>
  
  <blockquote>
    <ul>
    <li><p>Client</p>
    
    <ul>
    <li>Address: <code>http://example.com/endpoint.svc</code></li>
    <li>Access level for generated classes: <code>Public</code></li>
    <li>Allow generation of asynchronous operations: <code>checked</code> and <code>Generate task-based operations</code></li>
    </ul></li>
    <li><p>Data Type</p>
    
    <ul>
    <li>Always generate message contracts: <code>unchecked</code></li>
    <li>Collection type: <code>System.Array</code></li>
    <li>Dictionary collection type: <code>System.Collections.Generic.Dictionary</code></li>
    <li>Reuse types in referenced assemblies: <code>checked</code> and <code>Reuse types in all referenced assemblies</code></li>
    </ul></li>
    </ul>
  </blockquote>
  
  <h3>Visual Studio</h3>
  
  <p>I am using Visual Studio 2013 Pro Update 4 (12.0.31101.00 Update 4)</p>
  
  <h3>Project target</h3>
  
  <p>All are targeting x64</p>