title: Hangfire 1.6.4 .NET Core - Could not resolve dependencies
body: <p>I am using Hangfire 1.6.4 for my .NET Core project.</p>
  
  <p>Here is my Schedule controller:</p>
  
  <pre><code>    [HttpPost]
      public void Post([FromBody]EmailSchedulerDto emailSchedulerDto)
      {
          // test only
          emailSchedulerDto = new EmailSchedulerDto
          {
              UserId = "",
              Email = "myEmail@gmail.com",
              StoresId = new List&lt;string&gt;(),
              CronPattern = "* * * * *"
          };
          RecurringJob.AddOrUpdate(
              () =&gt;
                  _emailScheduler.ScheduleEmail(emailSchedulerDto.UserId, emailSchedulerDto.Email,
                      emailSchedulerDto.StoresId), emailSchedulerDto.CronPattern);
      }
  </code></pre>
  
  <p>But I have an error during job execution:</p>
  
  <pre><code>// Job ID: #183
  using MyProject.Services.Email;
  
  var emailScheduler = Activate&lt;EmailScheduler&gt;();
  await emailScheduler.ScheduleEmail(
      "",
      "myEmail@gmail.com",
      FromJson&lt;IEnumerable`1&gt;("[]")
  storesId
  );
  </code></pre>
  
  <p>System.InvalidOperationException</p>
  
  <p><strong>No service for type 'MyProject.Services.Email.EmailScheduler' has been registered.</strong></p>
  
  <p>I've already registered ContainerJobActivator like this:</p>
  
  <pre><code>public class ContainerJobActivator : JobActivator
  {
      private readonly IServiceProvider _serviceProvider;
  
      public ContainerJobActivator(IServiceProvider serviceProvider)
      {
          _serviceProvider = serviceProvider;
      }
  
      public override object ActivateJob(Type type)
      {
          return _serviceProvider.GetService(type);
      }
  }
  </code></pre>
  
  <p>And in Startup class:</p>
  
  <pre><code>GlobalConfiguration.Configuration.UseActivator(new ContainerJobActivator(services.BuildServiceProvider()));
  </code></pre>
  
  <p>Whats wrong?</p>
  
  <p>Thank you!</p>