title: Can't resolve types from unity config file
body: <p>Trying to set up Unity via XML configurations I'm getting this exception</p>
  
  <pre><code>The type name or alias ServiceHost could not be resolved. Please check your configuration file and verify this type name.
  </code></pre>
  
  <p>Trying to comment that out I get the same exception for the next and then the next after that so the problem must lie somewhere in my setup.</p>
  
  <pre><code>&lt;unity&gt;
      &lt;typeAliases&gt;
  
        &lt;!-- Lifetime manager types --&gt;
        &lt;typeAlias alias="singleton"
             type="Microsoft.Practices.Unity.ContainerControlledLifetimeManager,
               Microsoft.Practices.Unity" /&gt;
        &lt;typeAlias alias="external"
             type="Microsoft.Practices.Unity.ExternallyControlledLifetimeManager,
               Microsoft.Practices.Unity" /&gt;
        &lt;typeAlias alias="perThread"
             type="Microsoft.Practices.Unity.PerThreadLifetimeManager,
               Microsoft.Practices.Unity" /&gt;
  
        &lt;!-- User-defined type aliases --&gt;
        &lt;typeAlias alias="ServiceHost"
                   type="System.ServiceModel.ServiceHost, System.ServiceModel" /&gt;
        &lt;typeAlias alias="UnityServiceHost"
                   type="MyProjectServiceLibrary.Hosting.UnityServiceHost" /&gt;
  
        &lt;typeAlias alias="IServiceBehavior"
                   type="System.ServiceModel.Descriptions.IServiceBehavior, System.ServiceModel" /&gt;
        &lt;typeAlias alias="UnityServiceBehavior"
                   type="MyProjectServiceLibrary.Hosting.UnityServiceBehavior, MyProjectServiceLibrary" /&gt;
  
        &lt;typeAlias alias="IInstanceProvider"
                   type="System.ServiceModel.Dispatcher.IInstanceProvider, System.ServiceModel" /&gt;
        &lt;typeAlias alias="UnityInstanceProvider"
                   type="MyProjectServiceLibrary.Hosting.UnityInstanceProvider, MyProjectServiceLibrary" /&gt;
  
        &lt;typeAlias alias="MyProjectService"
                   type="MyProjectServiceLibrary.Service.MyProjectService, MyProjectServiceLibrary" /&gt;
  
        &lt;typeAlias alias="IRepositoryFactory"
                   type="MyProjectDataModelLibrary.Repository.IRepositoryFactory, MyProjectDataModelLibrary" /&gt;
        &lt;typeAlias alias="RepositoryFactory"
                   type="MyProjectDataModelLibrary.Repository.RepositoryFactory, MyProjectDataModelLibrary" /&gt;
  
        &lt;typeAlias alias="IDbContext"
                   type="MyProjectDataModelLibrary.DataContext.IDbContext, MyProjectDataModelLibrary" /&gt;
        &lt;typeAlias alias="MyProjectDatabase"
                   type="MyProjectDataModelLibrary.DataContext.MyProjectDatabase, MyProjectDataModelLibrary" /&gt;
  
        &lt;typeAlias alias="IRepositoryOfT"
                   type="MyProjectDataModelLibrary.Repository.IRepository`1, MyProjectDataModelLibrary" /&gt;
        &lt;typeAlias alias="EntityRepositoryOfT"
                   type="MyProjectDataModelLibrary.Repository.EntityRepository`1, MyProjectDataModelLibrary" /&gt;
  
      &lt;/typeAliases&gt;
  
      &lt;containers&gt;
  
        &lt;container&gt;
          &lt;types&gt;
  
            &lt;type type="MyProjectService" /&gt;
  
            &lt;type type="ServiceHost"
                  mapTo="UnityServiceHost" /&gt;
  
            &lt;type type="IServiceBehavior"
                  mapTo="UnityServiceBehavior" /&gt;
  
            &lt;type type="IInstanceProvider"
                  mapTo="UnityInstanceProvider" /&gt;
  
            &lt;type type="IRepositoryFactory"
                  mapTo="RepositoryFactory" /&gt;
  
            &lt;type type="IDbContext"
                  mapTo="MyProjectDatabase" /&gt;
  
            &lt;type type="IRepositoryOfT"
                  mapTo="EntityRepositoryOfT" /&gt;
  
          &lt;/types&gt;
        &lt;/container&gt;
  
      &lt;/containers&gt;
    &lt;/unity&gt;
  </code></pre>
  
  <p>I've tried reading around to see what I'm doing wrong. I doubt it's the fully qualified name though I can't be sure as I haven't really used that before.</p>
  
  <pre><code>IUnityContainer container = new UnityContainer();
  container.RegisterInstance&lt;IUnityContainer&gt;(container);
  UnityConfigurationSection section = (UnityConfigurationSection)ConfigurationManager.GetSection("unity");
  section.Configure(container);
  </code></pre>
  
  <p>The exception is thrown in the last line here.</p>