From d31f808ced41e0ea0408f6cf970dd762d4e94777 Mon Sep 17 00:00:00 2001 From: dengel Date: Tue, 19 Nov 2019 15:22:38 -0800 Subject: [PATCH] Document C++ runtime requirement in nuspec (#296) Don't throw exception on invalid app.config files (#287) --- .../Data/SqlClient/SqlAuthenticationProviderManager.cs | 6 +++--- tools/specs/Microsoft.Data.SqlClient.nuspec | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/SqlAuthenticationProviderManager.cs b/src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/SqlAuthenticationProviderManager.cs index 9e948e391a..39434bf0f7 100644 --- a/src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/SqlAuthenticationProviderManager.cs +++ b/src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/SqlAuthenticationProviderManager.cs @@ -24,14 +24,14 @@ internal class SqlAuthenticationProviderManager static SqlAuthenticationProviderManager() { var activeDirectoryAuthNativeProvider = new ActiveDirectoryNativeAuthenticationProvider(); - SqlAuthenticationProviderConfigurationSection configurationSection; + SqlAuthenticationProviderConfigurationSection configurationSection = null; try { configurationSection = (SqlAuthenticationProviderConfigurationSection)ConfigurationManager.GetSection(SqlAuthenticationProviderConfigurationSection.Name); } - catch (ConfigurationErrorsException e) + catch (ConfigurationErrorsException) { - throw SQL.CannotGetAuthProviderConfig(e); + // Don't throw an error for invalid config files } Instance = new SqlAuthenticationProviderManager(configurationSection); Instance.SetProvider(SqlAuthenticationMethod.ActiveDirectoryIntegrated, activeDirectoryAuthNativeProvider); diff --git a/tools/specs/Microsoft.Data.SqlClient.nuspec b/tools/specs/Microsoft.Data.SqlClient.nuspec index 2d103387ec..a373951608 100644 --- a/tools/specs/Microsoft.Data.SqlClient.nuspec +++ b/tools/specs/Microsoft.Data.SqlClient.nuspec @@ -21,6 +21,9 @@ Microsoft.Data.SqlClient.SqlTransaction Microsoft.Data.SqlClient.SqlParameterCollection Microsoft.Data.SqlClient.SqlClientFactory +When running on Windows, this library has a dependency on Microsoft.Data.SqlClient.SNI, which requires the Microsoft Visual C++ Redistributable for Visual Studio 2017 to be installed: +https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads + When using NuGet 3.x this package requires at least version 3.4. https://go.microsoft.com/fwlink/?linkid=2090501 © Microsoft Corporation. All rights reserved.