Skip to content

Commit

Permalink
Merge branch 'main' into Task-28274-Update-API-Documentation
Browse files Browse the repository at this point in the history
# Conflicts:
#	doc/snippets/Microsoft.Data.SqlClient/SqlException.xml
  • Loading branch information
H-Yeo committed Jan 30, 2024
2 parents bb3103c + 14d7292 commit f512737
Show file tree
Hide file tree
Showing 49 changed files with 1,555 additions and 1,552 deletions.
8 changes: 4 additions & 4 deletions BUILDGUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ msbuild -t:RunTests -p:configuration=Release -p:DotnetPath=C:\net6-win-x86\
To specify custom target framework, use `TF` property:

```bash
msbuild -t:RunTests -p:configuration=Release -p:TF=net7.0
msbuild -t:RunTests -p:configuration=Release -p:TF=net8.0
msbuild -t:RunTests -p:configuration=Release -p:TF=net48
# Runs tests for specified target framework.
# TargetNetCoreVersion and TargetNetFxVersion are not to be used with TF property, they will take precedence over TF if provided.
Expand Down Expand Up @@ -293,7 +293,7 @@ msbuild -t:BuildTestsNetFx -p:TargetNetFxVersion=net462
```bash
msbuild -t:BuildTestsNetCore -p:TargetNetCoreVersion=net6.0
# Build the tests for custom TargetFramework (.NET)
# Applicable values: net6.0 | net7.0
# Applicable values: net6.0 | net8.0
```

### Running Tests with custom target framework (traditional)
Expand All @@ -305,7 +305,7 @@ dotnet test -p:TargetNetFxVersion=net462 ...
dotnet test -p:TargetNetCoreVersion=net6.0 ...
# Use above property to run Functional Tests with custom TargetFramework (.NET)
# Applicable values: net6.0 | net7.0
# Applicable values: net6.0 | net8.0
```

## Using Managed SNI on Windows
Expand Down Expand Up @@ -389,7 +389,7 @@ Configure `runnerconfig.json` file with connection string and preferred settings

```bash
cd src\Microsoft.Data.SqlClient\tests\PerformanceTests
dotnet run -c Release -f net6.0|net7.0
dotnet run -c Release -f net6.0|net8.0
```

_Only "**Release** Configuration" applies to Performance Tests_
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,27 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)

## [Preview Release 5.2.0-preview5.24024.3] - 2024-01-24

This update brings the below changes over the previous release:

### Added

- Added .NET 8 support [#2230](https://github.com/dotnet/SqlClient/pull/2230)
- Added explicit version for major .NET version dependencies on System.Runtime.Caching 8.0.0, System.Configuration.ConfigurationManager 8.0.0, and System.Diagnostics.DiagnosticSource 8.0.0 [#2303](https://github.com/dotnet/SqlClient/pull/2303)
- Added the ability to generate debugging symbols in a separate package file [#2137](https://github.com/dotnet/SqlClient/pull/2137)

### Changed

- Changed Microsoft.IdentityModel.JsonWebTokens and Microsoft.IdentityModel.Protocols.OpenIdConnect version 6.24.0 to 6.35.0 [#2290](https://github.com/dotnet/SqlClient/pull/2290) to address [CVE-2024-21319](https://www.cve.org/CVERecord?id=CVE-2024-21319)

### Fixed

- Fixed connection to unsubscribe from transaction completion events before returning it to the connection pool [#2301](https://github.com/dotnet/SqlClient/pull/2301)
- Fixed InvalidCastException when reading an Always Encrypted date or time column [#2275](https://github.com/dotnet/SqlClient/pull/2275)
- Fixed token caching to prevent expired access tokens from being reused in a connection pool [#2273](https://github.com/dotnet/SqlClient/pull/2273)
- Code health improvements: [#2288](https://github.com/dotnet/SqlClient/pull/2288), [#2305](https://github.com/dotnet/SqlClient/pull/2305), [#2254](https://github.com/dotnet/SqlClient/pull/2254), [#2317](https://github.com/dotnet/SqlClient/pull/2317)

## [Preview Release 5.2.0-preview4.23342.2] - 2023-12-08

This update brings the below changes over the previous release:
Expand Down
42 changes: 21 additions & 21 deletions RunPackageReferenceTests.cmd

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions RunProjectReferenceTests.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ set netcoreVersion=net6.0

:: Accept two parameters for .NET Framework and .NET versions.
:: Examples:
:: - uses net48 and net7.0:
:: > RunProjectReferenceTests.cmd net48 net7.0
:: - uses net48 and net8.0:
:: > RunProjectReferenceTests.cmd net48 net8.0
:: - uses default target frameworks:
:: > RunProjectReferenceTests.cmd
:: - uses net48 and default target frameworks for netcore:
Expand Down
10 changes: 7 additions & 3 deletions build.proj
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@
The provided path should be ended to a `\` character without white spaces: Ex. C:\x86\
-->
<DotnetPath></DotnetPath>
<!-- Using these properties to compile and pack netfx dll fixes nuget package explorer error "Compiler flags: missing" -->
<NugetPackProperties>DebugType=portable;DebugSymbols=true;IncludeSymbols=true;SymbolPackageFormat=snupkg;PublishRepositoryUrl=true;RepositoryUrl=https://github.com/dotnet/sqlclient;RepositoryType=git;EmbedUnTrackedSources=true;Deterministic=true;</NugetPackProperties>
<!-- TF_BUILD is enabled only within AzureDevOps pipeline to support continuous integation build. -->
<NugetPackProperties Condition="'$(TF_BUILD)' == 'true'">$(NugetPackProperties);ContinuousIntegrationBuild=true;</NugetPackProperties>
</PropertyGroup>

<!-- Release Build properties must be turned on for Release purposes, and turned off for Code Coverage calculations -->
Expand Down Expand Up @@ -109,7 +113,7 @@
</Target>

<Target Name="BuildNetFx" DependsOnTargets="RestoreNetFx" Condition="'$(IsEnabledWindows)' == 'true'">
<MSBuild Projects="@(NetFxDriver)" Properties="$(CI);Platform=AnyCPU;$(ProjectProperties)" />
<MSBuild Projects="@(NetFxDriver)" Properties="$(CI);Platform=AnyCPU;$(ProjectProperties);$(NugetPackProperties);" />
</Target>

<Target Name="BuildSqlServerLibAnyOS" DependsOnTargets="RestoreSqlServerLib">
Expand Down Expand Up @@ -198,11 +202,11 @@
<Target Name="BuildAKVNetFx" Condition="'$(IsEnabledWindows)' == 'true'">
<MSBuild Projects="@(AKVProvider)" Targets="restore" Properties="TestTargetOS=$(TestOS)netfx" />
<Message Text=">>> Building AKVNetFx [$(CI);TestTargetOS=$(TestOS)netfx;Platform=AnyCPU;$(TestProjectProperties)] ..." Condition="!$(ReferenceType.Contains('Package'))"/>
<MSBuild Projects="@(AKVProvider)" Properties="$(CI);TestTargetOS=$(TestOS)netfx;Platform=AnyCPU;$(TestProjectProperties)" Condition="!$(ReferenceType.Contains('Package'))"/>
<MSBuild Projects="@(AKVProvider)" Properties="$(CI);TestTargetOS=$(TestOS)netfx;Platform=AnyCPU;$(TestProjectProperties);$(NugetPackProperties);" Condition="!$(ReferenceType.Contains('Package'))"/>

<!-- Only build platform specific builds for Package reference types -->
<Message Text=">>> Building AKVNetFx [$(CI);TestTargetOS=$(TestOS)netfx;Platform=$(Platform);$(TestProjectProperties)] ..." Condition="$(ReferenceType.Contains('Package'))"/>
<MSBuild Projects="@(AKVProvider)" Properties="$(CI);TestTargetOS=$(TestOS)netfx;Platform=$(Platform);$(TestProjectProperties);" Condition="$(ReferenceType.Contains('Package'))"/>
<MSBuild Projects="@(AKVProvider)" Properties="$(CI);TestTargetOS=$(TestOS)netfx;Platform=$(Platform);$(TestProjectProperties);$(NugetPackProperties);" Condition="$(ReferenceType.Contains('Package'))"/>
</Target>

<Target Name="BuildAKVNetCore">
Expand Down
103 changes: 103 additions & 0 deletions release-notes/5.2/5.2.0-preview5.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
# Release Notes

## [Preview Release 5.2.0-preview5.24024.3] - 2024-01-24

This update brings the below changes over the previous release:

### Added

- Added .NET 8 support [#2230](https://github.com/dotnet/SqlClient/pull/2230)
- Added explicit version for major .NET version dependencies on System.Runtime.Caching 8.0.0, System.Configuration.ConfigurationManager 8.0.0, and System.Diagnostics.DiagnosticSource 8.0.0 [#2303](https://github.com/dotnet/SqlClient/pull/2303)
- Added the ability to generate debugging symbols in a separate package file [#2137](https://github.com/dotnet/SqlClient/pull/2137)

### Changed

- Changed Microsoft.IdentityModel.JsonWebTokens and Microsoft.IdentityModel.Protocols.OpenIdConnect version 6.24.0 to 6.35.0 [#2290](https://github.com/dotnet/SqlClient/pull/2290) to address [CVE-2024-21319](https://www.cve.org/CVERecord?id=CVE-2024-21319)

### Fixed

- Fixed connection to unsubscribe from transaction completion events before returning it to the connection pool [#2301](https://github.com/dotnet/SqlClient/pull/2301)
- Fixed InvalidCastException when reading an Always Encrypted date or time column [#2275](https://github.com/dotnet/SqlClient/pull/2275)
- Fixed token caching to prevent expired access tokens from being reused in a connection pool [#2273](https://github.com/dotnet/SqlClient/pull/2273)
- Code health improvements: [#2288](https://github.com/dotnet/SqlClient/pull/2288), [#2305](https://github.com/dotnet/SqlClient/pull/2305), [#2254](https://github.com/dotnet/SqlClient/pull/2254), [#2317](https://github.com/dotnet/SqlClient/pull/2317)

## Target Platform Support

- .NET Framework 4.6.2+ (Windows x86, Windows x64)
- .NET 6.0+ (Windows x86, Windows x64, Windows ARM64, Windows ARM, Linux, macOS)
- .NET Standard 2.0+ (Windows x86, Windows x64, Windows ARM64, Windows ARM, Linux, macOS)

### Dependencies

#### .NET Framework

- Microsoft.Data.SqlClient.SNI 5.2.0-preview1.23340.1
- Azure.Identity 1.10.3
- Microsoft.Identity.Client 4.56.0
- Microsoft.IdentityModel.Protocols.OpenIdConnect 6.35.0
- Microsoft.IdentityModel.JsonWebTokens 6.35.0
- System.Buffers 4.5.1
- System.Configuration.ConfigurationManager 6.0.1
- System.Runtime.InteropServices.RuntimeInformation 4.3.0
- System.Text.Encoding.Web 6.0.0

#### .NET 6

- Microsoft.Data.SqlClient.SNI 5.2.0-preview1.23340.1
- Azure.Identity 1.10.3
- Microsoft.Identity.Client 4.56.0
- Microsoft.IdentityModel.Protocols.OpenIdConnect 6.35.0
- Microsoft.IdentityModel.JsonWebTokens 6.35.0
- Microsoft.SqlServer.Server 1.0.0
- System.Configuration.ConfigurationManager 6.0.1
- System.Diagnostics.DiagnosticSource 6.0.1
- System.Runtime.Caching 6.0.0

#### .NET 8

- Microsoft.Data.SqlClient.SNI 5.2.0-preview1.23340.1
- Azure.Identity 1.10.3
- Microsoft.Identity.Client 4.56.0
- Microsoft.IdentityModel.Protocols.OpenIdConnect 6.35.0
- Microsoft.IdentityModel.JsonWebTokens 6.35.0
- Microsoft.SqlServer.Server 1.0.0
- System.Configuration.ConfigurationManager 8.0.0
- System.Diagnostics.DiagnosticSource 8.0.0
- System.Runtime.Caching 8.0.0

#### .NET Standard 2.0

- Microsoft.Data.SqlClient.SNI 5.2.0-preview1.23340.1
- Azure.Identity 1.10.3
- Microsoft.Identity.Client 4.56.0
- Microsoft.IdentityModel.Protocols.OpenIdConnect 6.35.0
- Microsoft.IdentityModel.JsonWebTokens 6.35.0
- Microsoft.SqlServer.Server 1.0.0
- Microsoft.Win32.Registry 5.0.0
- System.Buffers 4.5.1
- System.Configuration.ConfigurationManager 6.0.1
- System.Diagnostics.DiagnosticSource 6.0.1
- System.Runtime.Caching 6.0.0
- System.Text.Encoding.CodePages 6.0.0
- System.Text.Encodings.Web 6.0.0
- System.Runtime.Loader 4.3.0
- System.Security.Cryptography.Cng 5.0.0
- System.Security.Principal.Windows 5.0.0

#### .NET Standard 2.1

- Microsoft.Data.SqlClient.SNI 5.2.0-preview1.23340.1
- Azure.Identity 1.10.3
- Microsoft.Identity.Client 4.56.0
- Microsoft.IdentityModel.Protocols.OpenIdConnect 6.35.0
- Microsoft.IdentityModel.JsonWebTokens 6.35.0
- Microsoft.SqlServer.Server 1.0.0
- Microsoft.Win32.Registry 5.0.0
- System.Configuration.ConfigurationManager 6.0.1
- System.Diagnostics.DiagnosticSource 6.0.1
- System.Runtime.Caching 6.0.0
- System.Text.Encoding.CodePages 6.0.0
- System.Text.Encodings.Web 6.0.0
- System.Runtime.Loader 4.3.0
- System.Security.Cryptography.Cng 5.0.0
- System.Security.Principal.Windows 5.0.0
1 change: 1 addition & 0 deletions release-notes/5.2/5.2.0.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
| Release Date | Version | Notes |
| :-- | :-- | :--: |
| 2024/01/24 | 5.2.0-preview5.24024.3 | [release notes](5.2.0-preview5.md) |
| 2023/12/08 | 5.2.0-preview4.23342.2 | [release notes](5.2.0-preview4.md) |
| 2023/07/20 | 5.2.0-preview3.23201.1 | [release notes](5.2.0-preview3.md) |
| 2023/06/08 | 5.2.0-preview2.23159.1 | [release notes](5.2.0-preview2.md) |
Expand Down
1 change: 1 addition & 0 deletions release-notes/5.2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ The following Microsoft.Data.SqlClient 5.2 preview releases have been shipped:

| Release Date | Version | Notes |
| :-- | :-- | :--: |
| 2024/01/24 | 5.2.0-preview5.24024.3 | [release notes](5.2.0-preview5.md) |
| 2023/12/08 | 5.2.0-preview4.23342.2 | [release notes](5.2.0-preview4.md) |
| 2023/07/20 | 5.2.0-preview3.23201.1 | [release notes](5.2.0-preview3.md) |
| 2023/06/08 | 5.2.0-preview2.23159.1 | [release notes](5.2.0-preview2.md) |
Expand Down
18 changes: 18 additions & 0 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,26 @@
<DefineConstants>$(DefineConstants);ENCLAVE_SIMULATOR</DefineConstants>
</PropertyGroup>

<!-- Packaging for source link-->
<PropertyGroup>
<DebugType>portable</DebugType>
<DebugSymbols>true</DebugSymbols>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<EmbedUnTrackedSources>true</EmbedUnTrackedSources>
</PropertyGroup>
<PropertyGroup Condition="'$(TF_BUILD)' == 'true'">
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="$(MicrosoftSourceLinkGitHubVersion)" PrivateAssets="All">
</PackageReference>
</ItemGroup>


<!-- Provides Version properties -->
<Import Project="$(ToolsDir)props\Versions.props" />
<Import Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0'))" Project="$(ToolsDir)props\VersionsNet8OrLater.props" />
<!-- Provides Tool properties -->
<Import Project="$(ToolsDir)props\Tools.props" />
<!-- Provides Build properties -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,19 @@
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
</PropertyGroup>
<PropertyGroup>
<TargetFrameworkMonikerAssemblyAttributesPath>$([System.IO.Path]::Combine('$(IntermediateOutputPath)','$(GeneratedSourceFileName)'))</TargetFrameworkMonikerAssemblyAttributesPath>
</PropertyGroup>
<ItemGroup>
<EmbeddedFiles Include="$(GeneratedAssemblyInfoFile)" />
<EmbeddedFiles Include="$(TargetFrameworkMonikerAssemblyAttributesPath)" />
</ItemGroup>
<ItemGroup>
<ProjectReference Condition="'$(TargetGroup)'=='netcoreapp' AND !$(ReferenceType.Contains('Package'))" Include="$(NetCoreSource)src\Microsoft.Data.SqlClient.csproj" />
<ProjectReference Condition="'$(TargetGroup)'=='netfx' AND !$(ReferenceType.Contains('Package'))" Include="$(NetFxSource)src\Microsoft.Data.SqlClient.csproj" />
<PackageReference Condition="$(ReferenceType.Contains('Package'))" Include="Microsoft.Data.SqlClient" Version="$(TestMicrosoftDataSqlClientVersion)" />
</ItemGroup>
<ItemGroup>
<PackageReference Condition="$(BuildForRelease) == 'true'" Include="Microsoft.SourceLink.GitHub" Version="$(MicrosoftSourceLinkGitHubVersion)" PrivateAssets="All" />
<PackageReference Include="Azure.Core" Version="$(AzureCoreVersion)" />
<PackageReference Include="System.Text.Encodings.Web" Version="$(SystemTextEncodingsWebVersion)" />
<PackageReference Include="Azure.Security.KeyVault.Keys" Version="$(AzureSecurityKeyVaultKeysVersion)" />
Expand Down
2 changes: 1 addition & 1 deletion src/Microsoft.Data.SqlClient/add-ons/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<Otherwise>
<PropertyGroup>
<TargetFrameworks Condition="'$(TestTargetOS)' == 'Windowsnetstandard' OR '$(TestTargetOS)' == 'Unixnetstandard'">netstandard2.0;netstandard2.1</TargetFrameworks>
<TargetFrameworks Condition="'$(TestTargetOS)' == 'Windowsnetcoreapp' OR '$(TestTargetOS)' == 'Unixnetcoreapp'">net6.0;net7.0</TargetFrameworks>
<TargetFrameworks Condition="'$(TestTargetOS)' == 'Windowsnetcoreapp' OR '$(TestTargetOS)' == 'Unixnetcoreapp'">net6.0;net8.0</TargetFrameworks>
<TargetFrameworks Condition="'$(TestTargetOS)' == 'Windowsnetfx'">net462</TargetFrameworks>
</PropertyGroup>
</Otherwise>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1443,9 +1443,13 @@ internal SqlException() { }
public override string Source { get { throw null; } }
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient/SqlException.xml' path='docs/members[@name="SqlException"]/State/*'/>
public byte State { get { throw null; } }

/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient/SqlException.xml' path='docs/members[@name="SqlException"]/GetObjectData/*'/>
#if !NET6_0_OR_GREATER
[System.Security.Permissions.SecurityPermissionAttribute(System.Security.Permissions.SecurityAction.LinkDemand, Flags = System.Security.Permissions.SecurityPermissionFlag.SerializationFormatter)]
#endif
#if NET8_0_OR_GREATER
[System.Obsolete("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
#endif
public override void GetObjectData(System.Runtime.Serialization.SerializationInfo si, System.Runtime.Serialization.StreamingContext context) { }
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient/SqlException.xml' path='docs/members[@name="SqlException"]/ToString/*'/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
<TargetFrameworks>net7.0;net6.0;netstandard2.0;netstandard2.1</TargetFrameworks>
<TargetFrameworks>net8.0;net6.0;netstandard2.0;netstandard2.1</TargetFrameworks>
<TargetFrameworks Condition="$(ReferenceType)=='NetStandard' AND $(TargetNetStandardVersion)=='netstandard2.1'">netstandard2.1</TargetFrameworks>
<IntermediateOutputPath>$(ObjFolder)$(Configuration)\$(AssemblyName)\ref\</IntermediateOutputPath>
<OutputPath>$(BinFolder)$(Configuration)\$(AssemblyName)\ref\</OutputPath>
Expand Down
Loading

0 comments on commit f512737

Please sign in to comment.