You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using a mix of the .NET System.Configuration.ConfigurationManager and System.Configuration.Abstractions.ConfigurationManager to retrieve and update appSettings, the returned results aren't consistent.
Then try to refresh the section and retrieve the update value using the System.Configuration.Abstractions.ConfigurationManager.
config.RefreshSection("appSettings");varsecondValue=config.AppSettings["something"];// This returns "A" but _should_ return "B".
The above code should have returned the updated value "B" but returns the original value "A".
I've run the above scenario and confirmed the value in App.config file does get updated but I suspect the System.Configuration.Abstractions.ConfigurationManager is using a memory backed cache of app settings.
I'm not sure of the correct solution to this bug other than possible not mixing usage of System.Configuration.Abstractions.ConfigurationManager and the .NET System.Configuration.ConfigurationManager
The text was updated successfully, but these errors were encountered:
When using a mix of the .NET
System.Configuration.ConfigurationManager
andSystem.Configuration.Abstractions.ConfigurationManager
to retrieve and update appSettings, the returned results aren't consistent.Here are the full steps to reproduce the problem:
Setup an App.config that contains:
Create a
System.Configuration.Abstractions.ConfigurationManager
instance and load the app setting:Now use a .NET
System.Configuration.ConfigurationManager
to update the value.Then try to refresh the section and retrieve the update value using the
System.Configuration.Abstractions.ConfigurationManager
.The above code should have returned the updated value "B" but returns the original value "A".
I've run the above scenario and confirmed the value in App.config file does get updated but I suspect the
System.Configuration.Abstractions.ConfigurationManager
is using a memory backed cache of app settings.I'm not sure of the correct solution to this bug other than possible not mixing usage of
System.Configuration.Abstractions.ConfigurationManager
and the .NETSystem.Configuration.ConfigurationManager
The text was updated successfully, but these errors were encountered: