I am writing an Azure function in VS 2017. I need to set up a few custom configuration parameters. I added them in local.settings.json under Values.
{
"IsEncrypted":false,
"Values" : {
"CustomUrl" : "www.google.com",
"Keys": {
"Value1":"1",
"Value2" :"2"
}
}
}
Now, ConfigurationManager.AppSettings["CustomUrl"] returns null.
I'm using:
- .NET Framework 4.7
- Microsoft.NET.Sdk.Functions 1.0.5
- System.Configuration.ConfigurationManager 4.4.0
- Azure.Functions.Cli 1.0.4
Am I missing something?


ConfigurationManager.AppSettings?local.settings.jsonis marked to always be copied to the build output.ConfigurationManager.AppSettingsshows an object with Count = 0, KeyCollection = 0 etc..bin\Debug\net461. There you should find a folder per function, and yourhost.jsonandlocal.settings.json. After that, VS launchesAzure.Functions.Cli.exefrom the path above, with that folder as the current working directory, andhost startas args. That should copy all your settings fromlocal.settings.jsontoAzure.Functions.Cli.exe.configin that folder.