No job functions found. try making your job classes and methods public. if you’re using binding extensions (e.g. azure storage, servicebus, timers, etc.) make sure you’ve called the registration method for the extension(s) in your startup code (e.g. builder.addazurestorage(), builder.addservicebus(), builder.addtimers(), etc.).

Error: No Job Functions Found

To solve this error, you need to ensure that your job classes and methods are defined as public. By default, Azure Functions requires public accessibility for job functions to be discovered and executed.

Here is an example of a correctly defined job class and method:


    public class MyJobClass
    {
        public void MyJobMethod([TimerTrigger("0 */5 * * * *")] TimerInfo timer)
        {
            // Perform your job tasks here
        }
    }
  

Additionally, if you are using any binding extensions like Azure Storage, Service Bus, Timers, etc., make sure you have called the registration method for the extension(s) in your startup code. This is usually done using the builder object in the Startup class.

Here is an example of how to register the Azure Storage extension in the startup code:


    using Microsoft.Azure.Functions.Extensions.DependencyInjection;
    using Microsoft.Extensions.DependencyInjection;
    
    [assembly: FunctionsStartup(typeof(MyNamespace.Startup))]
    
    namespace MyNamespace
    {
        public class Startup : FunctionsStartup
        {
            public override void Configure(IFunctionsHostBuilder builder)
            {
                builder.AddAzureStorage();
            }
        }
    }
  

Similarly, you can register other binding extensions like Service Bus and Timers using builder.AddServiceBus() and builder.AddTimers() respectively.

Make sure you have included the necessary NuGet packages for the binding extensions you are using in your project.

Read more

Leave a comment