I developed a Azure Function in Visual Studio and it works when published in Azure (since a year ago).
Now I made a template from that Azure Function, in Visual Studio, and I changed some details, but it's mainly the same. When I test it locally, it works fine.
But when I publish it in Azure and try to test it, I get this error:
The ConnectionString property has not been initialized
I usually write the Connection String in the Application Settings (and it works well for the older Azure functions).
Here is how the function gets the value of the Connection String:
var repo = new GranularRepository(ConfigurationManager.AppSettings["BoConnectionString"]);
I also tried:
var repo = new AvgDeliveryTime_GranularRepository(Environment.GetEnvironmentVariable("BodbConnectionString"));