From 9ce8e5a02dece620402129c97e1b80be46a19a66 Mon Sep 17 00:00:00 2001 From: Cheena Malhotra Date: Thu, 21 May 2020 19:07:53 -0700 Subject: [PATCH] Same changes as NetFx --- .../SqlClient/SqlAuthenticationProviderManager.NetCoreApp.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlAuthenticationProviderManager.NetCoreApp.cs b/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlAuthenticationProviderManager.NetCoreApp.cs index 8238de1c23..62e420373e 100644 --- a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlAuthenticationProviderManager.NetCoreApp.cs +++ b/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlAuthenticationProviderManager.NetCoreApp.cs @@ -16,7 +16,7 @@ internal partial class SqlAuthenticationProviderManager static SqlAuthenticationProviderManager() { var activeDirectoryAuthNativeProvider = new ActiveDirectoryNativeAuthenticationProvider(); - SqlAuthenticationProviderConfigurationSection configurationSection; + SqlAuthenticationProviderConfigurationSection configurationSection = null; try { @@ -24,7 +24,7 @@ static SqlAuthenticationProviderManager() } catch (ConfigurationErrorsException) { - configurationSection = null; + // Don't throw an error for invalid config files } Instance = new SqlAuthenticationProviderManager(configurationSection);