Fixed issue where singleton configuration cache was blocking creation of new components

This commit is contained in:
TheXamlGuy
2024-10-07 23:12:22 +01:00
parent 1c28659eac
commit f47e3deee9
6 changed files with 51 additions and 53 deletions
+3 -3
View File
@@ -68,8 +68,7 @@ public class ComponentBuilder :
where TConfiguration :
class, new()
{
hostBuilder.AddConfiguration(section: section, path: ConfigurationFile,
defaultConfiguration: configuration);
hostBuilder.AddConfiguration(section, ConfigurationFile, configuration);
return this;
}
@@ -90,7 +89,8 @@ public class ComponentBuilder :
public IComponentHost Build()
{
hostBuilder.UseContentRoot(ContentRoot, true)
hostBuilder
.UseContentRoot(ContentRoot, true)
.ConfigureAppConfiguration(config =>
{
config.AddJsonFile(ConfigurationFile, true, true);