Ravindra Barapatre
Ravindra Barapatre

Reputation: 31

No Functions Found. Try making job classes and methods public

public class Program
{
    public static void Main()
    {
        var host = new JobHost();
        host.RunAndBlock();
    }

    public static void ProcessMessage([ServiceBusTrigger("Topic", "Subscription")] BrokeredMessage message)
    {
        //TO DO(message);
    }
}

I am running code Local m/c.

In above code I am trying to trigger Topic's subscription on entry.

but when I run Code It gave me error

No Functions Found. Try making job classes and methods public

I tried same method in public Function class, but doesn't work.

But when I changed ServiceBusTrigger to QueueTrigger It worked.

I have set below config properly.

<add name="AzureWebJobsDashboard" connectionString="{Connection string}"/>

<add name="AzureWebJobsStorage" connectionString="{Connection_String}"/>    

<add name="AzureWebJobsServiceBus" connectionString="{Connection_String}"/> 

Where am I getting wrong?

Upvotes: 1

Views: 3561

Answers (1)

mathewc
mathewc

Reputation: 13558

I assume you're using the latest prerelease v1.1.0 version? In that version we made a change, which requires you to call config.UseServiceBus() in your startup code. The ServiceBus bindings are now extensions (like the rest of the external binding extensions in azure-webjobs-sdk-extensions and must now be registered explicitly.

This change is also discussed in this blog post.

Upvotes: 2

Related Questions