-
Notifications
You must be signed in to change notification settings - Fork 425
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
Update System.Configuration.ConfigurationManager.Appsettings property to read appsettings.json #33
Comments
Is there any indication when this is available for use? |
@mkamonster It will be in the 0.10 release, which will be out within a few days. We'll create a new "release" on the releases page. |
Thanks for the feedback Donna! In that case we will use a small workaround for the remaining days. |
Wow, that's nice. It's already released. It works like a charm. For the people wondering on where to put settings in appsettings.json. Make use of the Values property for your keys. {
"IsEncrypted": false,
"Values": {
"AzureWebJobsStorage": "",
"AzureWebJobsDashboard": "",
"Message": "Hello world!"
}
} You can in this case access the message via: ConfigurationManager.AppSettings["Message"] |
@mkamonster Thanks for providing the example! As you can see, our documentation is lagging behind our releases at the moment. :) I'll make sure to add this example to the documentation work item. |
How do I get the update? Do I just download WebToolsAzure2015.exe (from https://aka.ms/azfunctiontools) again? |
At the moment of running I got the message if I wanted to upgrade the cli. I did. But because it's a npm package I think updating it via npm should work as well. |
actually VS doesn't use the npm package. VS has it's own logic to check for updates and download the latest tooling. It happens once per VS session though (as far as I know), so you'd have to kill all VS instances and then launch it. When you try to run any functions projects you'll get notified to upgrade. |
Thanks. I was prompted as you described. |
From @jimt4593 on January 18, 2017 6:44
Right now, the only way to read appsettings, stored is apsettings.json, is from the environment. My Azure Function uses assemblies that user ConfigurationManager.AppSettings to read app setting values. These assemblies are also used by Azure web apps and web apps that still run on web servers running on premise.
I do not want to have to update these assemblies to access app settings in 2 ways. Using ConfigurationManager. AppSettings first. Then, if not found, using Envirorment.GetEnviromentVariable. I'd like to requst that ConfigurationManager.Appsettings be updated to read values from the application.json file.
Copied from original issue: Azure/Azure-Functions#149
The text was updated successfully, but these errors were encountered: