mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 17:11:10 +00:00
Merge pull request #133 from BinaryAlley/bugfix/fix-appsettings-file-name-case
Switches appsettings file names to lowercase so configuration loads on case-sensitive filesystems
This commit is contained in:
3 files changed
+3
-3
No files matched your search
@@ -31,7 +31,7 @@ public static class SharedConfiguration
|
|||||||
throw new DirectoryNotFoundException($"The base path '{basePath}' does not exist.");
|
throw new DirectoryNotFoundException($"The base path '{basePath}' does not exist.");
|
||||||
configuration.SetBasePath(basePath);
|
configuration.SetBasePath(basePath);
|
||||||
configuration.AddJsonFile("appsettings.shared.json", optional: false, reloadOnChange: true);
|
configuration.AddJsonFile("appsettings.shared.json", optional: false, reloadOnChange: true);
|
||||||
configuration.AddJsonFile("appsettings.shared.Development.json", optional: true, reloadOnChange: true);
|
configuration.AddJsonFile("appsettings.shared.development.json", optional: true, reloadOnChange: true);
|
||||||
configuration.AddEnvironmentVariables(); // environment variables should override the configuration files
|
configuration.AddEnvironmentVariables(); // environment variables should override the configuration files
|
||||||
|
|
||||||
// bind the appsettings sections
|
// bind the appsettings sections
|
||||||
|
|||||||
+1
-1
@@ -28,7 +28,7 @@ internal static class PresentationApiLayerConfiguration
|
|||||||
throw new DirectoryNotFoundException($"The base path '{basePath}' does not exist.");
|
throw new DirectoryNotFoundException($"The base path '{basePath}' does not exist.");
|
||||||
configuration.SetBasePath(basePath);
|
configuration.SetBasePath(basePath);
|
||||||
configuration.AddJsonFile("appsettings.json", optional: false, reloadOnChange: true);
|
configuration.AddJsonFile("appsettings.json", optional: false, reloadOnChange: true);
|
||||||
configuration.AddJsonFile("appsettings.Development.json", optional: true, reloadOnChange: true);
|
configuration.AddJsonFile("appsettings.development.json", optional: true, reloadOnChange: true);
|
||||||
|
|
||||||
return services;
|
return services;
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -24,7 +24,7 @@ internal static class PresentationWebLayerConfiguration
|
|||||||
{
|
{
|
||||||
// add the configuration sources to the configuration builder
|
// add the configuration sources to the configuration builder
|
||||||
configuration.AddJsonFile("appsettings.json", optional: false, reloadOnChange: true);
|
configuration.AddJsonFile("appsettings.json", optional: false, reloadOnChange: true);
|
||||||
configuration.AddJsonFile("appsettings.Development.json", optional: true, reloadOnChange: true);
|
configuration.AddJsonFile("appsettings.development.json", optional: true, reloadOnChange: true);
|
||||||
|
|
||||||
serviceCollection.AddOptions<ServerConfigurationModel>()
|
serviceCollection.AddOptions<ServerConfigurationModel>()
|
||||||
.Bind(configuration.GetRequiredSection(ServerConfigurationModel.SECTION_NAME))
|
.Bind(configuration.GetRequiredSection(ServerConfigurationModel.SECTION_NAME))
|
||||||
|
|||||||
Reference in new issue
Block a user