Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
No Visual Studio Method or choice to mimic the CLI tool of --publish-local-settings (local.settings.json) #526
The TL|DR :
First : I wanted to first say, I love the work you do, and though I sound frustrated and upset, it's not personal, or even professional, I spent a lot of time trying to figure this out :) so no negative feelings in any way, I hope I can help you as much as you can help me. Thanks.)
Question at the heart of the issue :
Publishing new settings, or updating settings from the visual studio Azure Functions Tooling is either hidden or not existent.
What we experienced: Upon publishing, local.settings.json file was placed up in the function web app but not referenced, AND the function's web app was not updated to reflect the changes of the local.settings.json file's settings. causing us to have to manually edit the settings, (which we eventually automated in a secondary process)
What we were expecting: Automatic settings resolution(Insert/Update) upon publish.
When attempting to publish our azure function to Azure we encountered issues but the function worked as expected when local to the machine. After discovery we found that the local.settings.json file was not reproduced in the function with respect to the System.Configuration.ConfigurationManager.AppSettings or ~ConnectionStrings without manually adding the keys and values to the Application Settings page.
(Discovery process: We used the System.Configuration that was loaded in azure to spit out all the values that were available at the time of running and that's how we found out the local.settings.json file was not being ref'd [we did expect this as the documentation says that the "Local" Means "Local" but there's no Visual Studio Tooling "Update" Process but there is one in the CLI, but it doesn't take a Json File (just KeyValue Pairs)
Our Problem was the method to publish the local.settings.json file. as we can use the CLI tool to publish it. it's VERY cumbersome as we have to translate the local.settings.json file into key values (<.rant>using a method and Newtonsoft.JSON to convert it to the expected Key Value Pair expected by the CLI.) then run the command. (which we have automated through code) but only one person can run it and the knowledge gap in how the process is intended to work with the VS Tooling vs the CLI. <./rant>)
I reviewed the documentation late last night (1am) I could have easily missed something.
Let me know if you need any more information, I'd be happy to provide our project as is for demonstration, and I have additional documentation on our process of updating (that I just created last night for our team)
I was told via Twitter : https://twitter.com/AzureFunctions/status/920378264849231872 that the answer is to come Thursday.
Which means, they have an answer, and that it's not released in a form where we can get it yet :D so yeah.. that's something. I'll close this if it solves the problem.