Skip to content

UserSecrets should reload on changed #40020

Closed

Description

@Tratcher

Today the host will reload appsettings.json if it changes.

bool reloadOnChange = hostingContext.Configuration.GetValue("hostBuilder:reloadConfigOnChange", defaultValue: true);
config.AddJsonFile("appsettings.json", optional: true, reloadOnChange: reloadOnChange)
.AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true, reloadOnChange: reloadOnChange);

However, it does not reload the user secrets file.

config.AddUserSecrets(appAssembly, optional: true);

See
public static IConfigurationBuilder AddUserSecrets(this IConfigurationBuilder configuration, Assembly assembly, bool optional, bool reloadOnChange)

These are similar resources and should have similar functionality.

Activity

  1. added
    untriaged
    on Jul 28, 2020
  2. added
    help wanted
    and removed
    untriaged
    on Jul 28, 2020
  3. modified the milestones: 5.0.0, Future on Jul 28, 2020
  4. Marusyk commented on Jul 30, 2020

    @Marusyk
    Member

    I'll try to prepare PR for this. Please assign it to me

  5. eerhardt commented on Oct 6, 2020

    @eerhardt
    Member

    Unassigning since the linked PR was closed. @Marusyk - let us know if you are still interested in working on this.

  6. ghost locked as resolved and limited conversation to collaborators on Dec 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-Extensions-Hostinghelp wanted

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions