Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No Visual Studio Method or choice to mimic the CLI tool of --publish-local-settings (local.settings.json) #526

skyhoshi opened this issue Oct 5, 2017 · 4 comments


Copy link

@skyhoshi skyhoshi commented Oct 5, 2017

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 :

How do we use the --publish-local-settings arg in Visual Studio Function Tooling?

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.
(local.settings.json -> Application settings : ConnectionStrings, example: If the Key Exists, update it, if the key is locked it doesn't change (like the web.config), if the key doesn't exist create it.)

More Details:

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>)

  • Is this in the roadmap/Plan? are there release notes? updates? (that don't break my existing v1 VS Function App Project? [I tried to update to the latest SDK version and that was a completely different issue])
  • could we make an "Import Settings file" in the portal/CLI/LocalCLI that takes the Json file?

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)


Copy link

@joshfitabase joshfitabase commented Oct 11, 2017

This would be really useful for me as well. +1

Copy link

@skyhoshi skyhoshi commented Oct 17, 2017

I was told via Twitter : 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.

Copy link

@ChristianWeyer ChristianWeyer commented Nov 11, 2017

What was the answer - or what is your solution @skyhoshi ? :-)

Copy link

@skyhoshi skyhoshi commented Dec 14, 2017

Sorry for the delay, the answer is CLI, working on tooling support. not there yet. making a small project to "Update", right now i have a script that generates the output the CLI Expects. (JSON => Azure Portal : Application Settings KeyValue Pairs)

@skyhoshi skyhoshi closed this Dec 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.