How can I add a command line argument for when my app starts?
I'm using the Azure Functions in an isolated process, and after publish command, the worker.config.json
file is created. I didn't find much documentation about this file, but I have tried to edit it and add the "arguments" property, then it seems something like this:
{
"description": {
"language": "dotnet-isolated",
"extensions": [ ".dll" ],
"defaultExecutablePath": "dotnet",
"defaultWorkerPath": "MyFunctionProjectName.dll",
"workerIndexing": "false",
"arguments": ["foo-bar"]
}
}
But when my function starts, the below error is thrown.
[Information] The application 'foo-bar' does not exist.
So, how can I add command line arguments to my function?