-
Notifications
You must be signed in to change notification settings - Fork 45
Description
I changed my .Net google cloud function to a multi-project deployment. The function works on the server but I found out, that the appsetting.json is not more found from the framework.
My source folders look like the following
My analysis showed me, that the appsettings.json file is deployed on the server. The problem is, that the framework searches the appsettings.json file in the workspace (Environment.CurrentDirectory) folder and not in the folder of the main project where for example Visual Studio searches the file.
When I deploy the config file from the root folder and not from the main project folder then the framework finds the config file.
Would it be possible that the framework searches the config file in the root and in the main project folder? Then the deployment would be much easier because the cloud functions would run like Visual Studio.
Sure I can add the real position of the configuration file inside ConfigureAppConfiguration via configuration.AddJsonFile. But then my configuration file is behind the environment properties and I overwrite them.