skip to Main Content

After migrating my Azure Function app project from .NET 6 .NET 8, I’m facing this problem

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.).

Here is a screenshot of the problem

I tried everything as per the documentations. But I’m still facing that issue

2

Answers


  1. No job functions found. Try making your job classes and methods public

    This error or message occurs when the function definition is not right. You can use below code which runs correctly for .Net 8.

    For Http trigger:

    public IActionResult Run([HttpTrigger(AuthorizationLevel.Function, "get", "post")] HttpRequest req)
    {
        _logger.LogInformation("Hello Rithwik Bojja");
        return new OkObjectResult("Hi!Hi");
    }
    

    For, Service bus you can use public async Task Run.

    Make sure that you have set the function to public. Also in Program.cs is correctly configured like below:

    using Microsoft.Azure.Functions.Worker;
    using Microsoft.Extensions.DependencyInjection;
    using Microsoft.Extensions.Hosting;
    
    var rith = new HostBuilder()
        .ConfigureFunctionsWebApplication()
        .ConfigureServices(srs =>
        {
            srs.AddApplicationInsightsTelemetryWorkerService();
            srs.ConfigureFunctionsApplicationInsights();
        })
        .Build();
    
    rith.Run();
    

    Functions get detected as below:

    enter image description here

    Login or Signup to reply.
  2. In your local.settings.json

    you need

    "FUNCTIONS_WORKER_RUNTIME": "dotnet-isolated"
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search