Skip to content

Commit

Permalink
Enable SqlDiagnosticListener on .NET Standard (#1931)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattjohnsonpint committed Apr 3, 2023
1 parent b534f15 commit 4e323a0
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 52 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -516,11 +516,10 @@
<Link>Microsoft\Data\SqlClient\SqlEnclaveAttestationParameters.NotSupported.cs</Link>
</Compile>
</ItemGroup>
<ItemGroup Condition="'$(OSGroup)' != 'AnyOS' AND '$(TargetGroup)' == 'netstandard'">
<ItemGroup Condition="'$(OSGroup)' != 'AnyOS' AND '$(TargetFramework)' == 'netstandard2.0'">
<Compile Include="Microsoft\Data\SqlClient\SNI\SNIStreams.Task.cs" />
<Compile Include="Microsoft\Data\SqlClient\SNI\SslOverTdsStream.NetStandard.cs" />
<Compile Include="Microsoft\Data\SqlClient\SqlAuthenticationProviderManager.NetStandard.cs" />
<Compile Include="Microsoft\Data\SqlClient\SqlDiagnosticListener.NetStandard.cs" />
<Compile Include="Microsoft\Data\SqlClient\SqlDelegatedTransaction.NetStandard.cs" />
<Compile Include="Microsoft\Data\SqlClient\TdsParser.NetStandard.cs" />
</ItemGroup>
Expand Down Expand Up @@ -552,25 +551,21 @@
<Compile Include="..\..\src\Microsoft\Data\SqlClient\VirtualSecureModeEnclaveProviderBase.cs">
<Link>Microsoft\Data\SqlClient\VirtualSecureModeEnclaveProviderBase.cs</Link>
</Compile>
<Compile Include="Microsoft\Data\SqlClient\SNI\SNIStreams.ValueTask.cs" />
<Compile Include="Microsoft\Data\SqlClient\SNI\SslOverTdsStream.NetCoreApp.cs" />
<Compile Include="Microsoft\Data\SqlClient\AlwaysEncryptedKeyConverter.CrossPlatform.cs" />
<Compile Include="Microsoft\Data\SqlClient\SqlColumnEncryptionEnclaveProvider.NetCoreApp.cs" />
</ItemGroup>
<!-- netstandard 2.1 and above -->
<ItemGroup Condition="'$(OSGroup)' != 'AnyOS' AND '$(TargetFramework)' != 'netstandard2.0'">
<Compile Include="Microsoft\Data\SqlClient\SqlAuthenticationProviderManager.NetCoreApp.cs" />
<Compile Include="Microsoft\Data\SqlClient\SqlClientEventSource.NetCoreApp.cs" />
<Compile Include="Microsoft\Data\SqlClient\SqlColumnEncryptionEnclaveProvider.NetCoreApp.cs" />
<Compile Include="Microsoft\Data\SqlClient\SqlDelegatedTransaction.NetCoreApp.cs" />
<Compile Include="Microsoft\Data\SqlClient\TdsParser.NetCoreApp.cs" />
</ItemGroup>
<ItemGroup Condition="'$(OSGroup)' != 'AnyOS' AND '$(TargetGroup)' == 'netcoreapp'">
<Compile Include="..\..\src\Microsoft\Data\SqlClient\SqlDependencyUtils.AssemblyLoadContext.cs">
<Link>Microsoft\Data\SqlClient\SqlDependencyUtils.AssemblyLoadContext.cs</Link>
</Compile>
<Compile Include="Microsoft\Data\ProviderBase\DbConnectionPool.NetCoreApp.cs" />
<Compile Include="Microsoft\Data\SqlClient\SNI\SNIStreams.ValueTask.cs" />
<Compile Include="Microsoft\Data\SqlClient\SNI\SslOverTdsStream.NetCoreApp.cs" />
<Compile Include="Microsoft\Data\SqlClient\SqlAuthenticationProviderManager.NetCoreApp.cs" />
<Compile Include="Microsoft\Data\SqlClient\SqlConnectionFactory.AssemblyLoadContext.cs" />
<Compile Include="Microsoft\Data\SqlClient\SqlDelegatedTransaction.NetCoreApp.cs" />
<Compile Include="Microsoft\Data\SqlClient\SqlDiagnosticListener.NetCoreApp.cs" />
<Compile Include="Microsoft\Data\SqlClient\TdsParser.NetCoreApp.cs" />
<Compile Include="Microsoft\Data\SqlClient\SqlConnectionFactory.AssemblyLoadContext.cs" />
</ItemGroup>
<ItemGroup Condition="'$(OSGroup)' != 'AnyOS'">
<Compile Include="Resources\StringsHelper.cs">
Expand Down Expand Up @@ -642,6 +637,7 @@
<Compile Include="Microsoft\Data\SqlClient\SqlDataReader.cs" />
<Compile Include="Microsoft\Data\SqlClient\SqlDbColumn.cs" />
<Compile Include="Microsoft\Data\SqlClient\SqlDelegatedTransaction.cs" />
<Compile Include="Microsoft\Data\SqlClient\SqlDiagnosticListener.cs" />
<Compile Include="Microsoft\Data\SqlClient\SqlInternalConnectionTds.cs" />
<Compile Include="Microsoft\Data\SqlClient\SqlTransaction.cs" />
<Compile Include="Microsoft\Data\SqlClient\SqlUtil.cs" />
Expand Down Expand Up @@ -959,7 +955,7 @@
<!-- Enable the project reference for debugging purposes. -->
<!-- <ProjectReference Include="$(SqlServerSourceCode)\Microsoft.SqlServer.Server.csproj" /> -->
<PackageReference Include="Microsoft.SqlServer.Server" Version="$(MicrosoftSqlServerServerVersion)" />
<PackageReference Condition="$(TargetGroup) == 'netcoreapp' " Include="System.Diagnostics.DiagnosticSource" Version="$(SystemDiagnosticsDiagnosticSourceVersion)" />
<PackageReference Condition="$(TargetGroup) == 'netstandard'" Include="System.Diagnostics.DiagnosticSource" Version="$(SystemDiagnosticsDiagnosticSourceVersion)" />
<PackageReference Include="Azure.Identity" Version="$(AzureIdentityVersion)" />
<PackageReference Include="Microsoft.Identity.Client" Version="$(MicrosoftIdentityClientVersion)" />
<PackageReference Include="Microsoft.IdentityModel.Protocols.OpenIdConnect" Version="$(MicrosoftIdentityModelProtocolsOpenIdConnectVersion)" />
Expand Down

This file was deleted.

2 changes: 1 addition & 1 deletion tools/props/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
<MicrosoftDataSqlClientSNIRuntimeVersion>5.1.0</MicrosoftDataSqlClientSNIRuntimeVersion>
<SystemConfigurationConfigurationManagerVersion>6.0.1</SystemConfigurationConfigurationManagerVersion>
<MicrosoftSqlServerServerVersion>1.0.0</MicrosoftSqlServerServerVersion>
<SystemDiagnosticsDiagnosticSourceVersion>6.0.0</SystemDiagnosticsDiagnosticSourceVersion>
<SystemDiagnosticsPerformanceCounterVersion>6.0.1</SystemDiagnosticsPerformanceCounterVersion>
<SystemRuntimeCachingVersion>6.0.0</SystemRuntimeCachingVersion>
<SystemSecurityCryptographyCngVersion>5.0.0</SystemSecurityCryptographyCngVersion>
Expand All @@ -49,6 +48,7 @@
<!-- NetStandard project dependencies -->
<PropertyGroup>
<SystemRuntimeLoaderVersion>4.3.0</SystemRuntimeLoaderVersion>
<SystemDiagnosticsDiagnosticSourceVersion>6.0.0</SystemDiagnosticsDiagnosticSourceVersion>
</PropertyGroup>
<!-- AKV Provider project dependencies -->
<PropertyGroup>
Expand Down
3 changes: 2 additions & 1 deletion tools/specs/Microsoft.Data.SqlClient.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ When using NuGet 3.x this package requires at least version 3.4.</description>
<dependency id="Microsoft.IdentityModel.JsonWebTokens" version="6.24.0" />
<dependency id="Microsoft.SqlServer.Server" version="1.0.0"/>
<dependency id="System.Configuration.ConfigurationManager" version="6.0.1" exclude="Compile" />
<dependency id="System.Diagnostics.DiagnosticSource" version="6.0.0" exclude="Compile" />
<dependency id="System.Runtime.Caching" version="6.0.0" exclude="Compile" />
<dependency id="System.Text.Encoding.CodePages" version="6.0.0" exclude="Compile" />
<dependency id="System.Text.Encodings.Web" version="6.0.0" />
Expand All @@ -63,6 +62,7 @@ When using NuGet 3.x this package requires at least version 3.4.</description>
<dependency id="Microsoft.Win32.Registry" version="5.0.0" exclude="Compile" />
<dependency id="System.Buffers" version="4.5.1" />
<dependency id="System.Configuration.ConfigurationManager" version="6.0.1" exclude="Compile" />
<dependency id="System.Diagnostics.DiagnosticSource" version="6.0.0" exclude="Compile" />
<dependency id="System.Runtime.Caching" version="6.0.0" exclude="Compile" />
<dependency id="System.Text.Encoding.CodePages" version="6.0.0" exclude="Compile" />
<dependency id="System.Text.Encodings.Web" version="6.0.0" />
Expand All @@ -79,6 +79,7 @@ When using NuGet 3.x this package requires at least version 3.4.</description>
<dependency id="Microsoft.SqlServer.Server" version="1.0.0"/>
<dependency id="Microsoft.Win32.Registry" version="5.0.0" exclude="Compile" />
<dependency id="System.Configuration.ConfigurationManager" version="6.0.1" exclude="Compile" />
<dependency id="System.Diagnostics.DiagnosticSource" version="6.0.0" exclude="Compile" />
<dependency id="System.Runtime.Caching" version="6.0.0" exclude="Compile" />
<dependency id="System.Text.Encoding.CodePages" version="6.0.0" exclude="Compile" />
<dependency id="System.Text.Encodings.Web" version="6.0.0" />
Expand Down

0 comments on commit 4e323a0

Please sign in to comment.