title: Autofac None of the constructors found
body: <p>I create a project WindowsForm Application with DependencyInjection using Autofac. I have a problem when I build it. This is my Program.cs</p>
  
  <pre><code>        var builder = new ContainerBuilder();
          builder.RegisterAssemblyTypes(Assembly.GetExecutingAssembly());
          builder.RegisterType&lt;UnitOfWork&gt;().As&lt;IUnitOfWork&gt;().InstancePerDependency();
          builder.RegisterType&lt;DbFactory&gt;().As&lt;IDbFactory&gt;().InstancePerDependency();
          builder.RegisterType&lt;DITestDbContext&gt;().AsSelf().InstancePerDependency();
          // Repositories
          builder.RegisterAssemblyTypes(typeof(ProductCategoryRepository).Assembly)
              .Where(t =&gt; t.Name.EndsWith("Repository"))
              .AsImplementedInterfaces().InstancePerDependency();
  
          // Services
          builder.RegisterAssemblyTypes(typeof(ProductCategoryService).Assembly)
             .Where(t =&gt; t.Name.EndsWith("Service"))
             .AsImplementedInterfaces().InstancePerDependency();
          Autofac.IContainer container = builder.Build();
  
          Application.EnableVisualStyles();
          Application.SetCompatibleTextRenderingDefault(false);
          Application.Run(container.Resolve&lt;Form1&gt;());
  </code></pre>
  
  <p>I meet a error message</p>
  
  <blockquote>
    <p>DependencyResolutionException: An error occurred during the activation of a particular registration. See the inner exception for details. Registration: Activator = ProductCategoryService (ReflectionActivator), Services = [DITest.Service.IProductCategoryService], Lifetime = Autofac.Core.Lifetime.CurrentScopeLifetime, Sharing = None, Ownership = OwnedByLifetimeScope</p>
  </blockquote>
  
  <p>And</p>
  
  <blockquote>
    <p>DependencyResolutionException: An error occurred during the activation of a particular registration. See the inner exception for details. Registration: Activator = UnitOfWork (ReflectionActivator), Services = [DITest.Data.Infrastructure.IUnitOfWork], Lifetime = Autofac.Core.Lifetime.CurrentScopeLifetime, Sharing = None, Ownership = OwnedByLifetimeScope</p>
  </blockquote>
  
  <p>And </p>
  
  <blockquote>
    <p>NoConstructorsFoundException: No accessible constructors were found for the type 'DITest.Data.Infrastructure.UnitOfWork'.</p>
  </blockquote>
  
  <p>Anyone know how to fix this. Thanks you!!</p>