Basic question on adding a configuration file in Azure Function from Visual Studio

Viewed 48

I am creating a Azure Service Bus Trigger function in my visual studio and I have added a configuration file in the project. The file is read by one of my method in the Azure function. I would like to know that when I publish this function to my Function App in Azure, will this file be deployed as well or is there any thing else I have to do to make the function when deployed read this file??

1 Answers

Your idea should be feasible, but some design is needed. Generally, we will set it directly in the configuration settings, and then we can read the value from the environment variable:

enter image description here

For example, in C#, you can use: System.Environment.GetEnvironmentVariable()

Related