Custom Task. Registration

Richard Coady asked on June 27, 2019 16:23

Hi,

I have created a standalone dll, which I want to use in automated scheduled custom tasks. But I am not sure where i copy the completed dll to. Do I just copy into the bin folder? I have tried the cms\bin and Kentico Lib folder but when I try to setup the task I get assembly or class not found.

I have implemented the CMS.Scheduler.ITask interface "public string Execute(TaskInfo ti)"

I assume the dll needs to be discover able by placing in a folder. I am using dancing goat demo site.

Any ideas gratefully appreciated.

SOLVED: The dll needs to be in the cms\bin directory

Recent Answers


Peter Mogilnitski answered on June 27, 2019 17:33

Normally you would add [assembly: AssemblyDiscoverable] that ensures that the Kentico API can discover and work with custom classes/components registered in the web project

1 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on June 27, 2019 18:07

Typically, when you create a new project, you set a dependency on that new project into the Kentico project. Then after your project is built, it will automatically copy it into the Kentico project when that is built.

1 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.