For example, my BlobTrigger attribute might be [BlobTrigger("samples-workitems/{name}", Connection = "myblobaccount")], and in my local.settings.json, I have myblobaccount__serviceUri set to a valid service URI. This is perfectly valid, but the build output shows a warning:
cannot find value named 'myblobaccount' in local.settings.json that matches 'connection' property set on 'blobTrigger'
The same is also true if you do the same style of thing for AzureWebJobsStorage:
Missing value for AzureWebJobsStorage in local.settings.json. This is required for all triggers other than httptrigger, kafkatrigger, orchestrationTrigger, activityTrigger, entityTrigger.
The Build process complains with warnings if you use identity-based connections for testing locally.
For example, my BlobTrigger attribute might be
[BlobTrigger("samples-workitems/{name}", Connection = "myblobaccount")]
, and in my local.settings.json, I havemyblobaccount__serviceUri
set to a valid service URI. This is perfectly valid, but the build output shows a warning:The same is also true if you do the same style of thing for AzureWebJobsStorage:
The relevant code looks to be here: https://github.com/Azure/azure-functions-vs-build-sdk/blob/main/src/Microsoft.NET.Sdk.Functions.Generator/FunctionJsonConverter.cs
Instead of only looking for an exact match on the key, we should look for it as a prefix. This was already done in the Core Tools which may serve as a reference. Relevant issues: https://github.com/Azure/azure-functions-core-tools/issues/2755 and https://github.com/Azure/azure-functions-core-tools/issues/2552