UserSecrets reloadOnChange
See original GitHub issueWith AddJsonFile(...)
, the reloadOnChange
option is very convenient. Can this be made available for AddUserSecrets<T>()
as well?
I see that it can be added in UserSecretsConfigurationExtensions.cs
, but is there a reason for leaving it out from there?
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
UserSecrets should reload on changed · Issue #40020
bool reloadOnChange = hostingContext.Configuration.GetValue("hostBuilder:reloadConfigOnChange", defaultValue: true);. config.
Read more >ASP.NET Core (not that secret) User Secrets Explained
Unlike environment variables, user secrets are placed in a ... AddJsonFile("appsettings.json", optional: true, reloadOnChange: true) ...
Read more >Securing Sensitive Information with .NET User Secrets
NET User Secrets and how to use the feature to store sensitive values ... AddJsonFile("appsettings.json", optional: true, reloadOnChange: ...
Read more >c# - .Net Core 2.1 not reading User Secrets
AddJsonFile("appsettings.json", optional: true, reloadOnChange: true); // configurationBuilder.AddUserSecrets<Program>(); -> This does not ...
Read more >User Secrets in a .NET Core Console App
User Secrets are stored outside of the project tree in a JSON ... AddJsonFile("appsettings.json", optional: false, reloadOnChange: true); ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Resolved by @Kahbazi in https://github.com/aspnet/Extensions/pull/549. Thanks for the PR!
The implementation is trivial: add an overload and plumb it through to AddJsonFile.
https://github.com/aspnet/Configuration/blob/fdd8b2a0d02fc9f358d6f00514b7534f5f4b7a0a/src/Config.UserSecrets/UserSecretsConfigurationExtensions.cs#L140
I personally don’t care that much and don’t think it’s very useful. But if someone made a PR to add this overload, I would have no problem taking it in. IMO mark it up-for-grabs.