title: Dependency Injection and project structure for Console applications
body: <p>I have 4 projects:</p>
  
  <p><strong>Core (IServer):</strong></p>
  
  <ul>
  <li>System</li>
  <li>System.Core</li>
  </ul>
  
  <p><strong>DependencyResolver:</strong></p>
  
  <ul>
  <li>Core</li>
  <li>StructureMap </li>
  </ul>
  
  <p><strong>Infrastructure (Service):</strong></p>
  
  <ul>
  <li>Core</li>
  <li>External dependency</li>
  </ul>
  
  <p><strong>Console:</strong></p>
  
  <ul>
  <li>Core</li>
  <li>DependencyResolver</li>
  </ul>
  
  <p><strong>Requierements:</strong></p>
  
  <p>I am trying to use StructureMap only in the DependencyResolver.
  Furthermore the Console application should not know anything about Infrastucture.</p>
  
  <p>When I do not want to reference StructureMap on my Console Application I have to build a ServiceLocator.</p>
  
  <p>In the DependencyResolver I have a Bootstrapper that is responsible for calling StructureMap registry stuff (Register)</p>
  
  <p>In my Console application I want to get an instance. For this I need to reference StructureMap. Another way would be to write a little wrapper around StructureMaps resolving methods. </p>
  
  <p>Is there any other better way of decoupling the console from StructureMap?</p>