When I deploy an Azure Function from Visual Studio, the function.json file is always incorrect. An example of the function.json file is the following for a queue triggered function:
{
"generatedBy": "Microsoft.NET.Sdk.Functions-1.0.12",
"configurationSource": "attributes",
"bindings": [
{
"type": "queueTrigger",
"connection": "AzureWebJobsStorage",
"queueName": "queue",
"name": "myQueueItem"
}
],
"disabled": false,
"scriptFile": "../bin/x.dll",
"entryPoint": "x"
}
The correct function.json in order for the function to work in azure is:
{
"bindings": [
{
"type": "queueTrigger",
"connection": "AzureWebJobsStorage",
"direction" : "in",
"queueName": "queue",
"name": "myQueueItem"
}
],
"disabled": false,
"scriptFile": "../bin/x.dll",
"entryPoint": "x"
}
Is there any solution to automated deployments/ Visual Studio deployments that would do this automatically? Currently I am editing all the function.json files every deployment. Any solutions or workarounds would be appreciated.