I have an azure function in dotnet 5 with a queue trigger
public static class DequeuePendingJournal
{
[Function("DequeuePendingJournal")]
public static void Run([QueueTrigger("%JournalQueueName%", Connection = "%JournalQueueConnectionString%")] string queueItem,
FunctionContext context)
{
var logger = context.GetLogger("DequeuePendingJournal");
logger.LogInformation($"C# Queue trigger function processed: {queueItem}");
}
}
Note the values in %%.
In my local settings I have both key (JournalQueueConnectionString and JournalQueueName) with values XXXXXXXXXX. I also have "FUNCTIONS_WORKER_RUNTIME": "dotnet-isolated".
When I run the Azure function it seems the binding is not working fine because I have the next error:
The 'DequeuePendingJournal' function is in error: Microsoft.Azure.WebJobs.Host: Error indexing method 'Functions.DequeuePendingJournal'. Microsoft.Azure.WebJobs.Extensions.Storage: Storage account connection string 'AzureWebJobsXXXXXXXXXXXXXX' does not exist. Make sure that it is a defined App Setting.
It seems, for some reason, the framework is adding 'AzureWebJobs' as a prefix, no idea why.
How can I fix this?