5

I'm upgrading a project from Sitecore 9.1.1 to Sitecore 10. After I changed all the DLLs from Sitecore version 9.1.1 to 10.0 and migrated the project from .Net 4.7.2 to 4.8 I had this problem with the Job, any Idea how can I solve it?

enter image description here

BTW, I tried to use these namespaces to solve the issue but nothing worked

using Sitecore.Jobs
using Sitecore.ContentSearch.ContentExtraction.IFilter.Job

1 Answer 1

10

The Sitecore.Jobs.Job and Sitecore.Jobs.JobOptions classes have been removed in Sitecore 9.2. In their place you now have BaseJob and BaseJobOptions abstractions with DefaultJob and DefaultJobOptions concrete classes

In your case you can use DefaultJobOptions. You can see the constructor looks to be the same like on JobObtions.

public DefaultJobOptions(
      string jobName,
      string category,
      string siteName,
      object obj,
      string methodName)
      : this(jobName, category, siteName, obj, methodName, (object[]) null, false)
    {
      Assert.ArgumentNotNull((object) jobName, nameof (jobName));
      Assert.ArgumentNotNull((object) category, nameof (category));
      Assert.ArgumentNotNull((object) siteName, nameof (siteName));
      Assert.ArgumentNotNull(obj, nameof (obj));
      Assert.ArgumentNotNull((object) methodName, nameof (methodName));
    }
1
  • Thank you @Vlad, I just found BaseJob data type in Sitecore.Abstractions.BaseJob Commented Mar 1, 2021 at 10:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.