diff --git a/src/Serilog.Settings.Configuration/Serilog.Settings.Configuration.csproj b/src/Serilog.Settings.Configuration/Serilog.Settings.Configuration.csproj
index a2d8160..4896d64 100644
--- a/src/Serilog.Settings.Configuration/Serilog.Settings.Configuration.csproj
+++ b/src/Serilog.Settings.Configuration/Serilog.Settings.Configuration.csproj
@@ -4,7 +4,7 @@
Microsoft.Extensions.Configuration (appsettings.json) support for Serilog.
3.5.0
Serilog Contributors
- netstandard2.0;net451;net461
+ netstandard2.0;net461
true
Serilog.Settings.Configuration
../../assets/Serilog.snk
@@ -20,18 +20,16 @@
snupkg
+
+
+
+
-
+
+
-
-
-
-
-
-
-
diff --git a/src/Serilog.Settings.Configuration/Settings/Configuration/ConfigurationReader.cs b/src/Serilog.Settings.Configuration/Settings/Configuration/ConfigurationReader.cs
index 8b20544..828dee1 100644
--- a/src/Serilog.Settings.Configuration/Settings/Configuration/ConfigurationReader.cs
+++ b/src/Serilog.Settings.Configuration/Settings/Configuration/ConfigurationReader.cs
@@ -20,18 +20,14 @@ class ConfigurationReader : IConfigurationReader
readonly IConfigurationSection _section;
readonly IReadOnlyCollection _configurationAssemblies;
readonly ResolutionContext _resolutionContext;
-#if NETSTANDARD || NET461
readonly IConfigurationRoot _configurationRoot;
-#endif
public ConfigurationReader(IConfigurationSection configSection, AssemblyFinder assemblyFinder, IConfiguration configuration = null)
{
_section = configSection ?? throw new ArgumentNullException(nameof(configSection));
_configurationAssemblies = LoadConfigurationAssemblies(_section, assemblyFinder);
_resolutionContext = new ResolutionContext(configuration);
-#if NETSTANDARD || NET461
_configurationRoot = configuration as IConfigurationRoot;
-#endif
}
// Used internally for processing nested configuration sections -- see GetMethodCalls below.
@@ -40,9 +36,7 @@ internal ConfigurationReader(IConfigurationSection configSection, IReadOnlyColle
_section = configSection ?? throw new ArgumentNullException(nameof(configSection));
_configurationAssemblies = configurationAssemblies ?? throw new ArgumentNullException(nameof(configurationAssemblies));
_resolutionContext = resolutionContext ?? throw new ArgumentNullException(nameof(resolutionContext));
- #if NETSTANDARD || NET461
_configurationRoot = resolutionContext.HasAppConfiguration ? resolutionContext.AppConfiguration as IConfigurationRoot : null;
- #endif
}
public void Configure(LoggerConfiguration loggerConfiguration)
@@ -192,8 +186,6 @@ void ApplyMinimumLevelConfiguration(IConfigurationSection directive, Action MixedMinimumLevel => new List