Azure-docs: Manage Application Settings Blank When No local.settings.json file

Created on 14 Aug 2019  Â·  8Comments  Â·  Source: MicrosoftDocs/azure-docs

Even though the template for creating an Azure function app generates a local.settings.json file, it is also automatically added to the .gitignore file. Anyone who checks out that repository will not have that file by default. When you open up the publish settings for the azure app in Visual Studio (I guess this is the publish profile) and click on Manage Application Settings (or in VS 2019 it is Edit Azure App Settings, I believe), the Application Settings pop-up window is actually blank. Only if a local.settings.json file is present (and it seems it must also at least have a section for Values, even if it is blank e.g. {"Values": { }} ), will it actually load the settings from the remote azure app service.

I'm not sure if this is a bug or not, but it should at least be mentioned in the article that you cannot manage the application setting from visual studio without the local.settings.json file (even if you are intending to change a remote setting).


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Pri1 assigned-to-author azure-functionsvc product-feedback triaged

Most helpful comment

Hey @jasondown I think that you have just highlighted a fantastic gap in tooling, and I think also a bug. I agree that your scenario will be a common one, namely downloading a project from source control and opening it in VS. In this case, there is no local.settings.json file. However, since there is a publish profile, you can get to the Application Settings screen, which is blank because it can't load a local.settings.json.
image
@mike-urnun-msft can you please reopen this issue? We need to figure out where to open an issue against the tools team for this bad behavior.

All 8 comments

Hi @jasondown - Thank you for your feedback! We will review and get back to you with our findings.

Hi @jasondown - I don't believe that that's a bug and the documentation does state below:
_"...Settings in local.settings.json are not uploaded automatically when you publish the project. To make sure that these settings also exist in your function app in Azure, you must upload them after you publish your project... "_ It also links to the dedicated section at Function app setting as well.

We will now proceed to close this thread for now. If there are further questions regarding this matter, please reopen it and we will gladly continue the discussion.

Fair enough. It just seems that the publish settings window in visual studio should not require a local settings file to be able to even see the remote settings (without having to either go to the portal or fetch them manually via the command line etc.). As a workaround, our team is creating a local.settings.json file in our repository that holds only a few stubs, committing that file and then adding it to gitignore to prevent accidentally committing any real settings to source control.

Hey @jasondown I think that you have just highlighted a fantastic gap in tooling, and I think also a bug. I agree that your scenario will be a common one, namely downloading a project from source control and opening it in VS. In this case, there is no local.settings.json file. However, since there is a publish profile, you can get to the Application Settings screen, which is blank because it can't load a local.settings.json.
image
@mike-urnun-msft can you please reopen this issue? We need to figure out where to open an issue against the tools team for this bad behavior.

Thanks @mike-urnun-msft! I'm chatting with folks on the Visual Studio team about this one, and I'll add a link here to the tracking issue, if I can.

Just curious if a separate ticket was opened with the VS team on this one. I'd like to follow that ticket if possible.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

behnam89 picture behnam89  Â·  3Comments

jamesgallagher-ie picture jamesgallagher-ie  Â·  3Comments

Favna picture Favna  Â·  3Comments

paulmarshall picture paulmarshall  Â·  3Comments

Agazoth picture Agazoth  Â·  3Comments