Skip to content

Use Microsoft.Data.SqlClient for all platforms except net452 #287

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

Merged
merged 1 commit into from
May 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
<PackageReference Include="System.Data.SqlClient" Version="4.4.0" />
<PackageReference Include="Microsoft.Data.SqlClient" Version="1.1.3" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="2.0.0" />
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="2.0.0" />
<Compile Include="Configuration\Extensions\Microsoft.Extensions.Configuration\**\*.cs" />
Expand All @@ -65,7 +65,7 @@

<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.0' Or '$(TargetFramework)' == 'net461' ">
<PackageReference Include="System.Configuration.ConfigurationManager" Version="4.5.0" />
<PackageReference Include="System.Data.SqlClient" Version="4.4.0" />
<PackageReference Include="Microsoft.Data.SqlClient" Version="1.1.3" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="2.0.0" />
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="2.0.0" />
<Compile Include="Configuration\Extensions\Hybrid\**\*.cs" />
Expand All @@ -76,7 +76,7 @@

<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.2' Or '$(TargetFramework)' == 'net472' ">
<PackageReference Include="System.Configuration.ConfigurationManager" Version="4.5.0" />
<PackageReference Include="System.Data.SqlClient" Version="4.6.0" />
<PackageReference Include="Microsoft.Data.SqlClient" Version="1.1.3" />
<PackageReference Include="Microsoft.Azure.Services.AppAuthentication" Version="1.4.0" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="2.0.0" />
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="2.0.0" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
using System;
#if NET452
using System.Data.SqlClient;
#else
using Microsoft.Data.SqlClient;
#endif
using Microsoft.Azure.Services.AppAuthentication;

namespace Serilog.Sinks.MSSqlServer.Sinks.MSSqlServer.Platform
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
using System;
#if NET452
using System.Data.SqlClient;
#else
using Microsoft.Data.SqlClient;
#endif

using System.Diagnostics.CodeAnalysis;

// This is an empty stub implementaion of IAzureManagedServiceAuthenticator for the target frameworks
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
using System.Data.SqlClient;
#if NET452
using System.Data.SqlClient;
#else
using Microsoft.Data.SqlClient;
#endif

namespace Serilog.Sinks.MSSqlServer.Sinks.MSSqlServer.Platform
{
internal interface IAzureManagedServiceAuthenticator
{
void SetAuthenticationToken(SqlConnection sqlConnection);
}
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
using System.Data.SqlClient;
#if NET452
using System.Data.SqlClient;
#else
using Microsoft.Data.SqlClient;
#endif

namespace Serilog.Sinks.MSSqlServer.Sinks.MSSqlServer.Platform
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
using System;
using System.Collections.Generic;
using System.Data;
#if NET452
using System.Data.SqlClient;
#else
using Microsoft.Data.SqlClient;
#endif
using System.Globalization;
using System.Linq;
using System.Threading.Tasks;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
using System;
#if NET452
using System.Data.SqlClient;
#else
using Microsoft.Data.SqlClient;
#endif

namespace Serilog.Sinks.MSSqlServer.Sinks.MSSqlServer.Platform
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
using System;
using System.Data;
#if NET452
using System.Data.SqlClient;
#else
using Microsoft.Data.SqlClient;
#endif
using System.Text;
using Serilog.Debugging;
using Serilog.Events;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
using System;
using System.Data;
#if NET452
using System.Data.SqlClient;
#else
using Microsoft.Data.SqlClient;
#endif
using Serilog.Debugging;
using Serilog.Sinks.MSSqlServer.Sinks.MSSqlServer.Platform;

Expand Down
1 change: 1 addition & 0 deletions src/Serilog.Sinks.MSSqlServer/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
<packages>
<package id="Serilog" version="2.5.0" targetFramework="net452" />
<package id="Serilog.Sinks.PeriodicBatching" version="2.1.1" targetFramework="net452" />
<package id="System.Data.SqlClient" Version="4.6.0" targetFramework="net452" />
</packages>
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
using System;
#if NET452
using System.Data.SqlClient;
#else
using Microsoft.Data.SqlClient;
#endif
using Microsoft.Azure.Services.AppAuthentication;
using Serilog.Sinks.MSSqlServer.Sinks.MSSqlServer.Platform;
using Serilog.Sinks.MSSqlServer.Tests.TestUtils;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
using System.Data;
#if NET452
using System.Data.SqlClient;
#else
using Microsoft.Data.SqlClient;
#endif
using Dapper;
using FluentAssertions;
using Moq;
Expand Down