For EventHub #32, ServiceBus #37, we have bad error messages when the connection string is not set. For Timer and Storage we now have a good message, but is specific to WebJobs and mentions app.config and the XML format.
For EventHub, ServiceBus and Storage bindings: parse function.json for all functions and look for the property connection.
Warning: Missing "TYPE" connection string "STRING" for function "FUNCTIONNAME". Run "func azure functionapp fetch-app-settings <functionAppName>" or specify a connection string in appsettings.json. type property (e.g., serviceBusTrigger, eventHubTrigger, inputputBlob, etc). For all bindings other than HTTP, if AzureWebJobStorage is missing or blank, print the warning Warning: Missing connection string for AzureWebJobsStorage. This setting is required for function "FUNCTIONNAME". Run "func azure functionapp fetch-app-settings <functionAppName>" or specify an Azure Storage connection string in appsettings.json.
If there are no HTTP triggers and WebJobsStorage is not set, don't launch the host, because the error message from the SDK will be very confusing.
We need to chat with the WebJobs experts to find a good implementation strategy.
Nice that it's flagged as bug, how to fix this issue?
Whats the right way of entering the connection string?
Does it gets read from the function.json?
@BartJanvanAssen you should enter the connection string in appsettings.json. In function.json, you just put in the connection string key, not the actual connection string.
Ah I see, many thanx!
If there are no HTTP triggers and WebJobsStorage is not set, don't launch the host, because the error message from the SDK will be very confusing.
What is this function.json everybody keeps talking about? My visual studio doesn't generate function.json at all. Where's the schema for this mysterious object?
I only see host.json and local.settings.json
@reddy6ue its generated when the function is build. You can find the function.json at{project-location}/bin/debug/{target-framework}/{function-name}/function.json
Most helpful comment
@BartJanvanAssen you should enter the connection string in appsettings.json. In function.json, you just put in the connection string key, not the actual connection string.