title: Cannot resolve parameter 'MediatR.ServiceFactory serviceFactory' (MediatR with Autofac)
body: <p>I'm attempting to run MediatR with Autofac in .NET Framework 4.6.2.</p>
  
  <p>My registration:</p>
  
  <pre><code>public class MediatorModule : Autofac.Module
  {
      protected override void Load(ContainerBuilder builder)
      {
          builder.RegisterSource(new ContravariantRegistrationSource());
          builder.RegisterAssemblyTypes(typeof(IMediator ).Assembly).AsImplementedInterfaces();
          builder.RegisterType&lt;HealthCheckQueryHandler&gt;().As&lt;IRequestHandler&lt;HealthCheckQuery, HttpStatusCode&gt;&gt;();
      }
  }
  </code></pre>
  
  <p>My controller:</p>
  
  <pre><code>[RoutePrefix("api/v1/healthcheck")]
  public class HealthCheckController : ApiController
  {
      private readonly IMediator _mediator;
  
      public HealthCheckController(IMediator mediator)
      {
          _mediator = mediator;
      }
  
      [HttpGet]
      [Route("")]
      public async Task&lt;HttpStatusCode&gt; Get()
      {
          var query = new HealthCheckQuery();
          var result = await _mediator.Send(query);
          return result;
      }
  }
  </code></pre>
  
  <p>When I try to hit this api method, I receive the following error:
  None of the constructors found with 'Autofac.Core.Activators.Reflection.DefaultConstructorFinder' on type 'MediatR.Mediator' can be invoked with the available services and parameters:\r\nCannot resolve parameter 'MediatR.ServiceFactory serviceFactory' of constructor 'Void .ctor(MediatR.ServiceFactory)</p>
  
  <p>The wiki (<a href="https://github.com/jbogard/MediatR/wiki" rel="nofollow noreferrer">https://github.com/jbogard/MediatR/wiki</a>) asks us to register SingleInstanceFactory and MultiInstanceFactory. But Visual Studio is not able to resolve either of these symbols.</p>
  
  <p>How can I resolve this to get MediatR working with Autofac?</p>