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
Description
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);
}
- Create a copy of
appsettings.json
somewhere and make some changes to the copy. - Delete the original
appsettings.json
(notice that the token doesn't fire. expected?) - 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