Skip to content
This repository was archived by the owner on Dec 18, 2018. It is now read-only.
This repository was archived by the owner on Dec 18, 2018. It is now read-only.

Reload token doesn't trigger on file deletion #433

Closed
@victorhurdugaci

Description

@victorhurdugaci

From scenario: https://github.com/aspnet/Release/issues/66

Run this app:

ConfigurationBuilder builder = new ConfigurationBuilder();
builder.AddJsonFile(s =>
{
    s.Path = "appsettings.json";
    s.ReloadOnChange = true;
});
var config = builder.Build();
var token = config.GetReloadToken();
token.RegisterChangeCallback(_ =>
{
    Console.WriteLine("Changed");
}, null);

while(true)
{
    Thread.Sleep(1000);
}
  1. Create a copy of appsettings.json somewhere and make some changes to the copy.
  2. Delete the original appsettings.json (notice that the token doesn't fire. expected?)
  3. Copy the copied settings file back where the original appsettings.json was

Expected: token fires because the has settings have been updated
Actual: nothing happens

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions