Use Case:
I've an Azure Function that will be triggered by 'serviceBusTrigger'. Following best practices, I've the Azure service bus connection string in 'appsettings.json' and likewise in app-settings on the Azure function app. All is well!
Now, I want to run the function locally and I am using cli like
cd "my function folder path"
func run .\myfunction.cs
Issue
It starts but gives an error
'Microsoft.Azure.WebJobs.Host: Error indexing method 'Functions.someFunction'. Microsoft.Azure.WebJobs.ServiceBus: Microsoft Azure WebJobs SDK ServiceBus connection string 'AzureWebJobsServiceBusConnectionString' is missing or empty.'
Questions
1) Is is possible to keep my setup and be able to launch the function via 'cli' 2) how do i resolve this error side note: I understand that Azure function is build on top of webJob SDK and this error is bit cryptic.
Attached image shows the setup for function, function.json, appsettings.json
Thank you for your help!