title: How can I get an assembly that isn't referenced in my project?
body: <p>I'm trying to get a list of assemblies for NHibernate to scan. I'm using some sample code from a tutorial application:</p>
  
  <pre><code>IEnumerable&lt;AssemblyName&gt; enumerable = GetType().Assembly.GetReferencedAssemblies()
                                 .Where(name =&gt; name.Name.StartsWith(assemblyPrefix));
  foreach (var assemblyName in enumerable)
    x.Assembly(assemblyName.Name);
  </code></pre>
  
  <p>So there are 3 projects: ProjectName, ProjectName.Services, and ProjectName.Data.</p>
  
  <p>The problem is that the assembly that is configuring NHibernate doesn't actually use the Services project. I thought just adding a project reference would work, but it doesn't.</p>
  
  <p>Is there any way to make my project reference Services, or should I just hardcode the assembly names in the configuration?</p>