Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Release/2.0] Fix configSection collision with System.Data.SqlClient type #701

Merged
merged 10 commits into from
Aug 21, 2020
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@ static SqlAuthenticationProviderManager()

try
{
configurationSection = (SqlAuthenticationProviderConfigurationSection)ConfigurationManager.GetSection(SqlAuthenticationProviderConfigurationSection.Name);
var section = ConfigurationManager.GetSection(SqlAuthenticationProviderConfigurationSection.Name);
if (null != section && ((ConfigurationSection)section).GetType().FullName.Contains("Microsoft.Data.SqlClient.SqlAuthenticationProviderConfigurationSection"))
{
configurationSection = (SqlAuthenticationProviderConfigurationSection)section;
}
}
catch (ConfigurationErrorsException e)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,11 @@ static SqlAuthenticationProviderManager()
SqlAuthenticationProviderConfigurationSection configurationSection = null;
try
{
configurationSection = (SqlAuthenticationProviderConfigurationSection)ConfigurationManager.GetSection(SqlAuthenticationProviderConfigurationSection.Name);
var section = ConfigurationManager.GetSection(SqlAuthenticationProviderConfigurationSection.Name);
if (null != section && ((ConfigurationSection)section).GetType().FullName.Contains("Microsoft.Data.SqlClient.SqlAuthenticationProviderConfigurationSection"))
{
configurationSection = (SqlAuthenticationProviderConfigurationSection)section;
}
}
catch (ConfigurationErrorsException e)
{
Expand Down
5 changes: 4 additions & 1 deletion tools/props/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
<Project ToolsVersion="Latest" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<AssemblyFileVersion Condition="'$(AssemblyFileVersion)' == ''">1.0.0.0</AssemblyFileVersion>
<AssemblyVersion>$(AssemblyFileVersion)</AssemblyVersion>
<!-- This Assembly version corresponds to version of Microsoft.Data.SqlClient v2.0.0 Assembly. -->
<!-- Should only be changed in future when a non-backwards compatible driver is released. -->
<!-- Future Assembly Version values shall be Major.0.0.0; e.g. 3.0.0.0 -->
<AssemblyVersion>2.0.20168.4</AssemblyVersion>
<MicrosoftDotNetGenAPIPackageVersion>1.0.0-beta.18578.2</MicrosoftDotNetGenAPIPackageVersion>
<NugetPackageVersion Condition="'$(NugetPackageVersion)' == ''">2.0.0-dev</NugetPackageVersion>
<Version>$(NugetPackageVersion)</Version>
Expand Down