title: Team Build sends error when trying to compile a Structuremap method
body: <p>I'm getting a strange error when trying to compile a solution that is using StructureMap on Team Build.</p>
  
  <p>When I try to compile the solution locally on Visual Studio it works fine, but when trying to queue a new build in Team Build I get the following error:</p>
  
  <blockquote>
    <p>Overload resolution failed because no accessible 'Use' can be called with these arguments:</p>
  </blockquote>
  
  <p>The line of code that gets this error is the second one:</p>
  
  <pre><code>ForSingletonOf(Of ISessionFactory)().Use(NHibernateSessionFactory.SessionFactory)
  Me.For(Of ISession)().lifecycleIs(New HybridLifecycle()).Use(Function(x) x.GetInstance(Of ISessionFactory)().OpenSession())
  </code></pre>
  
  <p>It's a standard registration for the NHibernate session, so I don't really get why this error pops up.</p>
  
  <p>Thanks in advance for the clues.</p>