I am trying to retrieve a custom setting from local.settings.json file. Example I am trying to read tables list present in the below local.settings.json file
When using Environment.GetEnvironmentVariable in an .Net Core Azure Function I had to add the EnvironmentVariableTarget.Process parameter to retrieve the connection string
string connectionString= Environment.GetEnvironmentVariable("DBConnectionString",
EnvironmentVariableTarget.Process);
My local.settings.json looked something like this:
{"IsEncrypted": false,
"Values": {
"AzureWebJobsStorage": "UseDevelopmentStorage=true",
"DBConnectionString": ""
}
}