Kentico 12 MVC Custom scheduled task

S T asked on July 24, 2023 13:17

Hi all, Following the instructions given here: https://docs.xperience.io/k12sp/configuring-kentico/scheduling-tasks/scheduling-custom-tasks I made a simple task which I want to register as a scheduled task in the kentico scheduled tasks module but my namespace and task name don't appear in the Task Provider assembly name or class. Even when I copy the namespace from the code and the class name it gives me an error "Invalid assembly or class name selected." How do I get my namespace to appear here and register this scheduled task ? Regards

Correct Answer

Juraj Ondrus answered on July 24, 2023 14:03

Well, I would recommend follow the documentation and create the class library project. Or, add the class to Old_App_Code (App_Code) folder - but in this case the namespace won't be displayed. It is listed only when using custom class library project.

0 votesVote for this answer Unmark Correct answer

Recent Answers


Juraj Ondrus answered on July 24, 2023 13:44

How was the class library project added to the solution? Have you added reference from the main CMSApp project to this custom class library? Also, you can try adding the AssemblyDiscoverable assembly attribute into the project's AssemblyInfo.cs file:

using CMS;

[assembly:AssemblyDiscoverable]

0 votesVote for this answer Mark as a Correct answer

S T answered on July 24, 2023 13:59

Hi @Juraj I just made a new class in my current Web project in a custom helpers folder so its not a custom class library project and the AssemblyDiscoverable is already in the AssemblyInfo. Do I need to make a new custom and create a custom class library project and reference it from the Web app or CMS for this to work ?

0 votesVote for this answer Mark as a Correct answer

S T answered on July 24, 2023 15:49

Adding the class to the Old_App_Code worked, thanks

0 votesVote for this answer Mark as a Correct answer

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