0

I started to implamenet first sample on quartz.net 2.0.1 but it gives an error.

I created an asp.net web aplication called QuartzSample

my simple code:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Quartz;

 namespace QuartzSample
 {
    public class Quartz : IJob
    {
        public void Execute(JobExecutionContext context)
        {
            SendMail();
        }
        private void SendMail()
        {
            // ...
        }
    }
}

Error :

The type or namespace name 'JobExecutionContext' could not be found (are you missing a using directive or an assembly reference?)
Jehof
  • 34,674
  • 10
  • 123
  • 155
Mennan
  • 4,451
  • 13
  • 54
  • 86

3 Answers3

5

I couldn't find JobExecutionContext, however, I did find IJobExecutionContext. I believe that is the former's replacement.

[edit] Found the migration guide: http://quartznet.sourceforge.net/migration_guide.html

From the looks of things they've changed a bunch of classes to interfaces. If you have Visual Studio, Intellisense should be able to help you find the right interface to use.

The tutorial hasn't been updated to accomadate 2.0 changes.

MHTri
  • 910
  • 2
  • 10
  • 30
0

Basically you have to change all classes

JobExecutionContext

to interfaces

IJobExecutionContext
Tomasz Maj
  • 1,541
  • 15
  • 15
0

if you are using NetCore install Abp.QuartzCore instead of Abp.Quartz

D__
  • 141
  • 1
  • 5