I'm trying to create a durable function, so I have one function with a serviceBusTrigger, one with an orchestrationTrigger, and one with an activityTrigger. I'm doing something wrong in terms of registering the trigger bindings.
When I run locally, I get the following error:
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. build.AddAzureStorage(), build.AddServiceBus(), builder.AddTimers(), etc.).
The following 3 functions are in error:
: The binding type(s) 'serviceBusTrigger' are not registered. Please ensure the type is correct and the binding extension is installed.
: The binding type(s) 'orchestrationTrigger' are not registered. Please ensure the type is correct and the binding extension is installed.
: The binding type(s) 'activityTrigger' are not registered. Please ensure the type is correct and the binding extension is installed.
In .net core functions, it's my understanding that there is no startup file to expressly register the bindings in code. Instead, I've just installed the nuget packages that correspond to each type of trigger.
For example reference, here is my serviceBusTrigger function:
[FunctionName("Function_HttpStart")]
public static async Task Run(
[ServiceBusTrigger("my-queuename", Connection = "ConnectionString")] RequestObject request,
[OrchestrationClient]DurableOrchestrationClient starter,
ILogger log)
{
var instanceId = await starter.StartNewAsync("OtherFunction", request);
log.LogInformation($"Started orchestration with ID = '{instanceId}'.");
}
and the function.json file that gets generated:
{
"generatedBy": "Microsoft.NET.Sdk.Functions-1.0.24",
"configurationSource": "attributes",
"bindings": [
{
"type": "serviceBusTrigger",
"connection": "ConnectionString",
"queueName": "my-queueName",
"name": "request"
}
],
"disabled": false,
"scriptFile": "../bin/x.dll",
"entryPoint": "Namespace.Project.Run"
}