question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

UserSecrets reloadOnChange

See original GitHub issue

With 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:closed
  • Created 6 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
natemcmastercommented, Nov 21, 2018

Resolved by @Kahbazi in https://github.com/aspnet/Extensions/pull/549. Thanks for the PR!

0reactions
natemcmastercommented, Mar 9, 2018

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.

Read more comments on GitHub >

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

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found