title: Autofac not resolving properties on external controller
body: <p>I have two projects: a standard Web Api project and a class library project which contains all the controllers. In the Web Api I have the following on the Global.asax class:</p>
  
  <pre><code>public class MvcApplication : HttpApplication
  {
      protected void Application_Start()
      {
          WebApiConfig.Register(GlobalConfiguration.Configuration);
  
          RouteConfig.RegisterRoutes(RouteTable.Routes);
  
          var builder = new ContainerBuilder();
  
          builder.RegisterApiControllers(GetAssemblies(true)).PropertiesAutowired();
          builder
              .RegisterAssemblyTypes(GetAssemblies(false))             
              .Where(t =&gt; t.GetCustomAttributes(typeof(IocContainerMarkerAttribute), false).Any())
              .PropertiesAutowired();
  
          GlobalConfiguration.Configuration.DependencyResolver = new AutofacWebApiDependencyResolver(builder.Build());
      }
  
      private static Assembly[] GetAssemblies(bool isController)
      {
          var path = HttpContext.Current.Server.MapPath("~/Bin");
  
          return isController
              ? Directory.GetFiles(path, "*.dll") .Where(x =&gt; x.Contains(".Controllers")).Select(Assembly.LoadFile).ToArray()
              : Directory.GetFiles(path, "*.dll").Select(Assembly.LoadFile).ToArray();
      }
  }
  </code></pre>
  
  <p>the controller:</p>
  
  <pre><code>public class PropertyAgentController : ApiController
  {
      public ICommandControllerProcessor CommandControllerProcessor { get; set; }
  
  
      [HttpPost]
      public HttpResponseMessage HandleMessage()
      {
          return CommandControllerProcessor.HandleMessage(this);
      }
  }
  </code></pre>
  
  <p>and the dependency:</p>
  
  <pre><code>public interface ICommandControllerProcessor
  {
      HttpResponseMessage HandleMessage(ApiController controller);
  }
  
  [IocContainerMarker]
  public class CommandControllerProcessor : ICommandControllerProcessor
  {
      public virtual HttpResponseMessage HandleMessage(ApiController controller)
      {
          return null;
      }
  }
  </code></pre>
  
  <p>The CommandControllerProcessor class lives in the web api project. The property was being resolved when I had the controllers in the same project but as soon as I created a different project, the controllers are still discovered but the property is not wired.</p>
  
  <p>Any ideas of what the problem might be?</p>
  
  <p>Thanks a lot.</p>