From 3d1fbd90ca1dee646aad9c51d5cac8ee3b4766e3 Mon Sep 17 00:00:00 2001 From: Matt Johnson-Pint Date: Wed, 22 Feb 2023 22:32:46 -0800 Subject: [PATCH 1/4] Enable SqlDiagnosticListener on .NET Standard --- .../src/Microsoft.Data.SqlClient.csproj | 3 +- .../SqlDiagnosticListener.NetStandard.cs | 36 ------------------- ...NetCoreApp.cs => SqlDiagnosticListener.cs} | 0 3 files changed, 1 insertion(+), 38 deletions(-) delete mode 100644 src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlDiagnosticListener.NetStandard.cs rename src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/{SqlDiagnosticListener.NetCoreApp.cs => SqlDiagnosticListener.cs} (100%) diff --git a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj b/src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj index bc755d3486..2327dd26fb 100644 --- a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj +++ b/src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj @@ -518,7 +518,6 @@ - @@ -567,7 +566,6 @@ - @@ -640,6 +638,7 @@ + diff --git a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlDiagnosticListener.NetStandard.cs b/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlDiagnosticListener.NetStandard.cs deleted file mode 100644 index 726a24c934..0000000000 --- a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlDiagnosticListener.NetStandard.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Collections.Generic; - -namespace Microsoft.Data.SqlClient -{ - internal sealed class SqlDiagnosticListener : IObservable> - { - public SqlDiagnosticListener(string name) - { - } - - public IDisposable Subscribe(IObserver> observer) - { - throw new NotSupportedException(); - } - - public bool IsEnabled() - { - return false; - } - - public bool IsEnabled(string name) - { - return false; - } - - internal void Write(string sqlBeforeExecuteCommand, object p) - { - throw new NotImplementedException(); - } - } -} diff --git a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlDiagnosticListener.NetCoreApp.cs b/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlDiagnosticListener.cs similarity index 100% rename from src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlDiagnosticListener.NetCoreApp.cs rename to src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlDiagnosticListener.cs From c53ab683d7533d8116e9132c62b26d72e118362f Mon Sep 17 00:00:00 2001 From: Matt Johnson-Pint Date: Fri, 24 Feb 2023 11:01:33 -0800 Subject: [PATCH 2/4] Use netcoreapp implementations on netstd2.1 where applicable --- .../src/Microsoft.Data.SqlClient.csproj | 29 +++++++++---------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj b/src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj index 2327dd26fb..4b2593d138 100644 --- a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj +++ b/src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj @@ -514,13 +514,6 @@ Microsoft\Data\SqlClient\SqlEnclaveAttestationParameters.NotSupported.cs - - - - - - - Microsoft\Data\SqlClient\AlwaysEncryptedEnclaveProviderUtils.cs @@ -549,24 +542,28 @@ Microsoft\Data\SqlClient\VirtualSecureModeEnclaveProviderBase.cs + + + + + + - - - + + + + + + Microsoft\Data\SqlClient\SqlDependencyUtils.AssemblyLoadContext.cs - - - - - - + From 5f9f224482dcc8ac6f0d01e026d783c58d764b5e Mon Sep 17 00:00:00 2001 From: Matt Johnson-Pint Date: Fri, 24 Feb 2023 11:38:59 -0800 Subject: [PATCH 3/4] Update package dependencies --- .../netcore/src/Microsoft.Data.SqlClient.csproj | 2 +- tools/props/Versions.props | 2 +- tools/specs/Microsoft.Data.SqlClient.nuspec | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj b/src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj index 4b2593d138..5b2acde5d7 100644 --- a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj +++ b/src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj @@ -956,7 +956,7 @@ - + diff --git a/tools/props/Versions.props b/tools/props/Versions.props index 840499aa2d..ea2278fdb4 100644 --- a/tools/props/Versions.props +++ b/tools/props/Versions.props @@ -38,7 +38,6 @@ 5.1.0 6.0.1 1.0.0 - 6.0.0 6.0.1 6.0.0 5.0.0 @@ -49,6 +48,7 @@ 4.3.0 + 6.0.0 diff --git a/tools/specs/Microsoft.Data.SqlClient.nuspec b/tools/specs/Microsoft.Data.SqlClient.nuspec index aded7d902a..2bf0dfce39 100644 --- a/tools/specs/Microsoft.Data.SqlClient.nuspec +++ b/tools/specs/Microsoft.Data.SqlClient.nuspec @@ -46,7 +46,6 @@ When using NuGet 3.x this package requires at least version 3.4. - @@ -63,6 +62,7 @@ When using NuGet 3.x this package requires at least version 3.4. + @@ -79,6 +79,7 @@ When using NuGet 3.x this package requires at least version 3.4. + From ca52e4bf45fccd1eb0e3d4eb7eba9d797b4bd1c4 Mon Sep 17 00:00:00 2001 From: Matt Johnson-Pint Date: Fri, 24 Feb 2023 11:50:50 -0800 Subject: [PATCH 4/4] Minor cleanup --- .../netcore/src/Microsoft.Data.SqlClient.csproj | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj b/src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj index 5b2acde5d7..2437c6da01 100644 --- a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj +++ b/src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj @@ -514,6 +514,13 @@ Microsoft\Data\SqlClient\SqlEnclaveAttestationParameters.NotSupported.cs + + + + + + + Microsoft\Data\SqlClient\AlwaysEncryptedEnclaveProviderUtils.cs @@ -551,13 +558,6 @@ - - - - - - - Microsoft\Data\SqlClient\SqlDependencyUtils.AssemblyLoadContext.cs