diff --git a/.config/CredScanSuppressions.json b/.config/CredScanSuppressions.json
new file mode 100644
index 0000000000..ffc7e87789
--- /dev/null
+++ b/.config/CredScanSuppressions.json
@@ -0,0 +1,25 @@
+{
+ "tool": "Credential Scanner",
+ "suppressions": [
+ {
+ "file": "src/Microsoft.Data.SqlClient/tests/Docker/DockerLinuxTest/Program.cs",
+ "justification": "Test projects should be skipped"
+ },
+ {
+ "file": "src/Microsoft.Data.SqlClient/tests/tools/TDS/TDS.Servers/TDSServerArguments.cs",
+ "justification": "Test projects should be skipped"
+ },
+ {
+ "file": "src/Microsoft.Data.SqlClient/tests/tools/TDS/TDS.Servers/TdsServerCertificate.pfx",
+ "justification": "Test projects should be skipped"
+ },
+ {
+ "file": "src/docker-compose.yml",
+ "justification": "Docker test project should be excluded"
+ },
+ {
+ "file": "doc/samples/SqlConnectionStringBuilder.cs",
+ "justification": "Documentation could include sample data and can be ignored"
+ }
+ ]
+}
diff --git a/.config/PolicheckExclusions.xml b/.config/PolicheckExclusions.xml
new file mode 100644
index 0000000000..d8c47d335d
--- /dev/null
+++ b/.config/PolicheckExclusions.xml
@@ -0,0 +1,5 @@
+
+ SRC/MICROSOFT.DATA.SQLCLIENT/TESTS
+ .YML|.MD|.SQL
+ NOTICE.TXT
+
\ No newline at end of file
diff --git a/.config/tsaoptions.json b/.config/tsaoptions.json
index a9be6f5aae..c9e3a2cfb6 100644
--- a/.config/tsaoptions.json
+++ b/.config/tsaoptions.json
@@ -1,11 +1,14 @@
{
"instanceUrl": "https://sqlclientdrivers.visualstudio.com/",
- "projectName": "ADO.NET",
- "areaPath": "ADO.NET",
- "iterationPath": "ADO.NET",
+ "projectName": "ADO.Net",
+ "areaPath": "ADO.Net",
+ "iterationPath": "ADO.Net\\TSA\\SqlClient",
"notificationAliases": [ "SqlClient@microsoft.com" ],
"repositoryName": "SqlClient",
"codebaseName": "SqlClient",
"allTools": true,
- "template": "MSDATA_RevolutionR"
+ "template": "MSDATA_RevolutionR",
+ "language": "csharp",
+ "includePathPatterns": "src/Microsoft.Data.SqlClient/*, src/Microsoft.SqlServer.Server/*, tools/*",
+ "excludePathPatterns": "src/Microsoft.Data.SqlClient/tests/*"
}
diff --git a/.gitignore b/.gitignore
index daeaf68c7a..bb6f58f9bd 100644
--- a/.gitignore
+++ b/.gitignore
@@ -353,6 +353,9 @@ healthchecksdb
# Backup folder for Package Reference Convert tool in Visual Studio 2017
MigrationBackup/
+# JetBrains Rider (cross platform .NET IDE) working folder
+.idea/
+
# Ionide (cross platform F# VS Code tools) working folder
.ionide/
diff --git a/BUILDGUIDE.md b/BUILDGUIDE.md
index 4434af3f1a..09143c84cf 100644
--- a/BUILDGUIDE.md
+++ b/BUILDGUIDE.md
@@ -8,6 +8,8 @@ This project should be built with Visual Studio 2019+ for the best compatibility
- **Visual Studio 2019** with imported components: [VS19Components](/tools/vsconfig/VS19Components.vsconfig)
+- **Powershell**: To build SqlClient on Linux, powershell is needed as well. Follow the distro specific instructions at [Install Powershell on Linux](https://learn.microsoft.com/en-us/powershell/scripting/install/installing-powershell-on-linux?view=powershell-7.4)
+
Once the environment is setup properly, execute the desired set of commands below from the _root_ folder to perform the respective operations:
## Building the driver
@@ -165,7 +167,6 @@ Manual Tests require the below setup to run:
|TCPConnectionString | Connection String for a TCP enabled SQL Server instance. | `Server={servername};Database={Database_Name};Trusted_Connection=True;`
OR `Data Source={servername};Initial Catalog={Database_Name};Integrated Security=True;`|
|NPConnectionString | Connection String for a Named Pipes enabled SQL Server instance.| `Server=\\{servername}\pipe\sql\query;Database={Database_Name};Trusted_Connection=True;`
OR
`Data Source=np:{servername};Initial Catalog={Database_Name};Integrated Security=True;`|
|TCPConnectionStringHGSVBS | (Optional) Connection String for a TCP enabled SQL Server with Host Guardian Service (HGS) attestation protocol configuration. | `Server=tcp:{servername}; Database={Database_Name}; UID={UID}; PWD={PWD}; Attestation Protocol = HGS; Enclave Attestation Url = {AttestationURL};`|
- |TCPConnectionStringAASVBS | (Optional) Connection String for a TCP enabled SQL Server with a VBS Enclave and using Microsoft Azure Attestation (AAS) attestation protocol configuration. | `Server=tcp:{servername}; Database={Database_Name}; UID={UID}; PWD={PWD}; Attestation Protocol = AAS; Enclave Attestation Url = {AttestationURL};`|
|TCPConnectionStringNoneVBS | (Optional) Connection String for a TCP enabled SQL Server with a VBS Enclave and using None Attestation protocol configuration. | `Server=tcp:{servername}; Database={Database_Name}; UID={UID}; PWD={PWD}; Attestation Protocol = NONE;`|
|TCPConnectionStringAASSGX | (Optional) Connection String for a TCP enabled SQL Server with a SGX Enclave and using Microsoft Azure Attestation (AAS) attestation protocol configuration. | `Server=tcp:{servername}; Database={Database_Name}; UID={UID}; PWD={PWD}; Attestation Protocol = AAS; Enclave Attestation Url = {AttestationURL};`|
|EnclaveEnabled | Enables tests requiring an enclave-configured server.|
@@ -176,8 +177,6 @@ Manual Tests require the below setup to run:
|AADSecurePrincipalSecret | (Optional) A Secret defined for a registered application which has been granted permission to the database defined in the AADPasswordConnectionString. | {Secret} |
|AzureKeyVaultURL | (Optional) Azure Key Vault Identifier URL | `https://{keyvaultname}.vault.azure.net/` |
|AzureKeyVaultTenantId | (Optional) The Azure Active Directory tenant (directory) Id of the service principal. | _{Tenant ID of Active Directory}_ |
- |AzureKeyVaultClientId | (Optional) "Application (client) ID" of an Active Directory registered application, granted access to the Azure Key Vault specified in `AZURE_KEY_VAULT_URL`. Requires the key permissions Get, List, Import, Decrypt, Encrypt, Unwrap, Wrap, Verify, and Sign. | _{Client Application ID}_ |
- |AzureKeyVaultClientSecret | (Optional) "Client Secret" of the Active Directory registered application, granted access to the Azure Key Vault specified in `AZURE_KEY_VAULT_URL` | _{Client Application Secret}_ |
|SupportsIntegratedSecurity | (Optional) Whether or not the USER running tests has integrated security access to the target SQL Server.| `true` OR `false`|
|LocalDbAppName | (Optional) If Local Db Testing is supported, this property configures the name of Local DB App instance available in client environment. Empty string value disables Local Db testing. | Name of Local Db App to connect to.|
|LocalDbSharedInstanceName | (Optional) If LocalDB testing is supported and the instance is shared, this property configures the name of the shared instance of LocalDB to connect to. | Name of shared instance of LocalDB. |
@@ -233,17 +232,15 @@ Tests can be built and run with custom "Reference Type" property that enables di
- "Project" => Build and run tests with Microsoft.Data.SqlClient as Project Reference
- "Package" => Build and run tests with Microsoft.Data.SqlClient as Package Reference with configured "TestMicrosoftDataSqlClientVersion" in "Versions.props" file.
-- "NetStandard" => Build and run tests with Microsoft.Data.SqlClient as Project Reference via .NET Standard Library
-- "NetStandardPackage" => Build and run tests with Microsoft.Data.SqlClient as Package Reference via .NET Standard Library
-> ************** IMPORTANT NOTE BEFORE PROCEEDING WITH "PACKAGE" AND "NETSTANDARDPACKAGE" REFERENCE TYPES ***************
+> ************** IMPORTANT NOTE BEFORE PROCEEDING WITH "PACKAGE" REFERENCE TYPE ***************
> CREATE A NUGET PACKAGE WITH BELOW COMMAND AND ADD TO LOCAL FOLDER + UPDATE NUGET CONFIG FILE TO READ FROM THAT LOCATION
>
> ```bash
> msbuild -p:configuration=Release
> ```
-A non-AnyCPU platform reference can only be used with package and NetStandardPackage reference types. Otherwise, the specified platform will be replaced with AnyCPU in the build process.
+A non-AnyCPU platform reference can only be used with package reference type. Otherwise, the specified platform will be replaced with AnyCPU in the build process.
### Building Tests with Reference Type
@@ -254,10 +251,6 @@ msbuild -t:BuildTestsNetCore -p:ReferenceType=Project
# Default setting uses Project Reference.
msbuild -t:BuildTestsNetCore -p:ReferenceType=Package
-
-msbuild -t:BuildTestsNetCore -p:ReferenceType=NetStandard
-
-msbuild -t:BuildTestsNetCore -p:ReferenceType=NetStandardPackage
```
For .NET Framework, below reference types are supported:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index d0e4d1acc3..29c1c394af 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,73 @@ 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/)
+## [Stable release 5.2.0] - 2024-02-28
+
+### Added
+
+- Added a new `AccessTokenCallBack` API to `SqlConnection`. [#1260](https://github.com/dotnet/SqlClient/pull/1260)
+- Added `SqlBatch` support on .NET 6+ [#1825](https://github.com/dotnet/SqlClient/pull/1825), [#2223](https://github.com/dotnet/SqlClient/pull/2223),[#2371](https://github.com/dotnet/SqlClient/pull/2371), [#2373](https://github.com/dotnet/SqlClient/pull/2373)
+- Added support of `SqlDiagnosticListener` on **.NET Standard**. [#1931](https://github.com/dotnet/SqlClient/pull/1931)
+- Added new property `RowsCopied64` to `SqlBulkCopy`. [#2004](https://github.com/dotnet/SqlClient/pull/2004)
+- Added support for the `SuperSocketNetLib` registry option for Encrypt on .NET on Windows. [#2047](https://github.com/dotnet/SqlClient/pull/2047)
+- Added the ability to generate debugging symbols in a separate package file [#2137](https://github.com/dotnet/SqlClient/pull/2137)
+- Added Workload Identity authentication support [#2159](https://github.com/dotnet/SqlClient/pull/2159), [#2264](https://github.com/dotnet/SqlClient/pull/2264)
+- Added support for Big Endian systems [#2170](https://github.com/dotnet/SqlClient/pull/2170)
+- Added support for Georgian collation [#2194](https://github.com/dotnet/SqlClient/pull/2194)
+- Added Localization support on .NET [#2210](https://github.com/dotnet/SqlClient/pull/2110)
+- 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)
+
+### Changed
+
+- Improved parsing buffered characters in `TdsParser`. [#1544](https://github.com/dotnet/SqlClient/pull/1544)
+- Added Microsoft.SqlServer.Types to verify support for SqlHierarchyId and Spatial for .NET Core. [#1848](https://github.com/dotnet/SqlClient/pull/1848)
+- Moved to new System.Data.SqlTypes APIs on **.NET 7** and up. [#1934](https://github.com/dotnet/SqlClient/pull/1934) and [#1981](https://github.com/dotnet/SqlClient/pull/1981)
+- Removed reference to Microsoft.Win32.Registry since it's shipped starting with .NET 6.0. [#1974](https://github.com/dotnet/SqlClient/pull/1974)
+- Changed **[UseOneSecFloorInTimeoutCalculationDuringLogin](https://learn.microsoft.com/sql/connect/ado-net/appcontext-switches#enable-a-minimum-timeout-during-login)** App Context switch default to **true** and extended its effect to .NET and .NET Standard. [#2012](https://github.com/dotnet/SqlClient/pull/2012)
+- Updated `Microsoft.Identity.Client` version from 4.47.2 to 4.53.0. [#2031](https://github.com/dotnet/SqlClient/pull/2031), [#2055](https://github.com/dotnet/SqlClient/pull/2055)
+- Switched to the new .NET [NegotiateAuthentication](https://learn.microsoft.com/en-us/dotnet/api/system.net.security.negotiateauthentication?view=net-7.0) API on .NET 7.0 and above for SSPI token negotiation using Managed SNI. [#2063](https://github.com/dotnet/SqlClient/pull/2063)
+- Removed `ignoreSniOpenTimeout` in open connection process on Windows. [#2067](https://github.com/dotnet/SqlClient/pull/2067)
+- Enforce explicit ordinal for internal `StringComparison` operations. [#2068](https://github.com/dotnet/SqlClient/pull/2068)
+- Improved error messages when validating server certificates in managed SNI (Linux/macOS) [#2060](https://github.com/dotnet/SqlClient/pull/2060)
+- Improved CPU usage when `AppContext` switches are in use [#2227](https://github.com/dotnet/SqlClient/pull/2227)
+- Upgraded `Azure.Identity` dependency version to [1.10.3](https://www.nuget.org/packages/Azure.Identity/1.10.3) to address [CVE-2023-36414](https://github.com/advisories/GHSA-5mfx-4wcx-rv27), [#2189](https://github.com/dotnet/SqlClient/pull/2189)
+- 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)
+- Updated `Microsoft.Data.SqlClient.SNI` (.NET Framework dependency) and `Microsoft.Data.SqlClient.SNI.runtime` (.NET/.NET Standard dependency) version to `v5.2.0`. [#2363](https://github.com/dotnet/SqlClient/pull/2363), which includes removing dead code and addressing static analysis warnings
+- Code health improvements: [#1198](https://github.com/dotnet/SqlClient/pull/1198), [#1829](https://github.com/dotnet/SqlClient/pull/1829), [#1943](https://github.com/dotnet/SqlClient/pull/1943), [#1949](https://github.com/dotnet/SqlClient/pull/1949), [#1959](https://github.com/dotnet/SqlClient/pull/1959), [#1985](https://github.com/dotnet/SqlClient/pull/1985), [#2071](https://github.com/dotnet/SqlClient/pull/2071), [#2073](https://github.com/dotnet/SqlClient/pull/2073), [#2088](https://github.com/dotnet/SqlClient/pull/2088), [#2091](https://github.com/dotnet/SqlClient/pull/2091), [#2098](https://github.com/dotnet/SqlClient/pull/2098), [#2121](https://github.com/dotnet/SqlClient/pull/2121), [#2122](https://github.com/dotnet/SqlClient/pull/2122), [#2132](https://github.com/dotnet/SqlClient/pull/2132), [#2136](https://github.com/dotnet/SqlClient/pull/2136), [#2144](https://github.com/dotnet/SqlClient/pull/2144), [#2147](https://github.com/dotnet/SqlClient/pull/2147), [#2157](https://github.com/dotnet/SqlClient/pull/2157), [#2164](https://github.com/dotnet/SqlClient/pull/2164), [#2166](https://github.com/dotnet/SqlClient/pull/2166), [#2168](https://github.com/dotnet/SqlClient/pull/2168), [#2186](https://github.com/dotnet/SqlClient/pull/2186), [#2254](https://github.com/dotnet/SqlClient/pull/2254), [#2288](https://github.com/dotnet/SqlClient/pull/2288), [#2305](https://github.com/dotnet/SqlClient/pull/2305), [#2317](https://github.com/dotnet/SqlClient/pull/2317)
+
+### Fixed
+
+- Fixed Always Encrypted secure enclave retry logic for async queries. [#1988](https://github.com/dotnet/SqlClient/pull/1988)
+- Fixed activity correlator to continue use of same GUID for connection activity. [#1997](https://github.com/dotnet/SqlClient/pull/1997)
+- Fixed behavior when error class is greater than 20 on connection retry. [#1953](https://github.com/dotnet/SqlClient/pull/1953)
+- Fixed error message when symmetric key decryption failed using Always Encrypted. [#1948](https://github.com/dotnet/SqlClient/pull/1948)
+- Fixed TransactionScope connection issue when Enlist is enable, Pooling is disabled and network connection type is Redirect. [#1960](https://github.com/dotnet/SqlClient/pull/1960)
+- Fixed TDS RPC error on large queries in SqlCommand.ExecuteReaderAsync. [#1936](https://github.com/dotnet/SqlClient/pull/1936)
+- Fixed throttling of token requests by calling AcquireTokenSilent. [#1925](https://github.com/dotnet/SqlClient/pull/1925)
+- Fixed Linux code coverage result in Build proj. [#1950](https://github.com/dotnet/SqlClient/pull/1950)
+- Fixed NullReferenceException in GetBytesAsync. [#1906](https://github.com/dotnet/SqlClient/pull/1906)
+- Fixed Transient fault handling issue with OpenAsync. [#1983](https://github.com/dotnet/SqlClient/pull/1983)
+- Fixed invariant mode checks. [#1917](https://github.com/dotnet/SqlClient/pull/1917)
+- Fixed GC behavior in TdsParser by adding array rental capability in TryReadPlpUnicodeChars. [#1866](https://github.com/dotnet/SqlClient/pull/1866)
+- Fixed socket synchronization issue during connect in managed SNI. [#1029](https://github.com/dotnet/SqlClient/pull/1029)
+- Fixed issue with `SqlConnectionStringBuilder` property indexer not supporting non-string values. [#2018](https://github.com/dotnet/SqlClient/pull/2018)
+- Fixed `SqlDataAdapter.Fill` and configurable retry logic issue on .NET Framework. [#2084](https://github.com/dotnet/SqlClient/pull/2084)
+- Fixed `SqlConnectionEncryptOption` type conversion by introducing the `SqlConnectionEncryptOptionConverter` attribute when using **appsettings.json** files. [#2057](https://github.com/dotnet/SqlClient/pull/2057)
+- Fixed th-TH culture info issue on Managed SNI. [#2066](https://github.com/dotnet/SqlClient/pull/2066)
+- Fixed an issue when using the Authentication option, but not encrypting on .NET Framework where the server certificate was being incorrectly validated [#2224](https://github.com/dotnet/SqlClient/pull/2224)
+- Fixed a deadlock problem for distributed transactions when on .NET [#2161](https://github.com/dotnet/SqlClient/pull/2161)
+- Fixed an issue with connecting to named instances on named pipes in managed SNI (Linux/macOS) [#2142](https://github.com/dotnet/SqlClient/pull/2142)
+- Fixed LocalDb connection issue with an invalid source when using managed SNI [#2129](https://github.com/dotnet/SqlClient/pull/2129)
+- Fixed an `AccessViolationException` when using a SQL Express user instance [#2101](https://github.com/dotnet/SqlClient/pull/2101)
+- Fixed a metadata query issue when connecting to Azure SQL Edge [#2099](https://github.com/dotnet/SqlClient/pull/2099)
+- Fixed file version information for .NET and .NET Standard binaries [#2093](https://github.com/dotnet/SqlClient/pull/2093)
+- Fixed the SPN sent for a named instance when using Kerberos authentication on Linux/macOS [#2240](https://github.com/dotnet/SqlClient/pull/2240)
+- 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)
+
## [Preview Release 5.2.0-preview5.24024.3] - 2024-01-24
This update brings the below changes over the previous release:
diff --git a/NuGet.config b/NuGet.config
new file mode 100644
index 0000000000..3233e60161
--- /dev/null
+++ b/NuGet.config
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/RunPackageReferenceTests.cmd b/RunPackageReferenceTests.cmd
index 037d5aa84c..fa503f905e 100644
--- a/RunPackageReferenceTests.cmd
+++ b/RunPackageReferenceTests.cmd
@@ -1,10 +1,10 @@
@echo off
-:: .NET CORE + .NET STANDARD LIBRARY TEST CASES
+:: .NET CORE TEST CASES
echo Building .NET Core Tests
call :pauseOnError msbuild -t:Clean
-:: ************** IMPORTANT NOTE BEFORE PROCEEDING WITH "PACKAGE" AND "NETSTANDARDPACKAGE" REFERENCE TYPES ***************
+:: ************** IMPORTANT NOTE BEFORE PROCEEDING WITH "PACKAGE" REFERENCE TYPE ***************
:: THESE ARE NOT STAND ALONE TEST COMMANDS AND NEED A DEVELOPER'S SPECIAL ATTENTION TO WORK. ATTEMPTING TO RUN THE ENTIRE SET OF COMMANDS AS-IS IS LIKELY TO FAIL!
:: CREATE A NUGET PACKAGE WITH BELOW COMMAND AND ADD TO LOCAL FOLDER + UPDATE NUGET CONFIG FILE TO READ FROM THAT LOCATION
@@ -70,74 +70,6 @@ call :pauseOnError msbuild -p:Configuration="Release" -t:BuildTestsNetFx -p:Targ
call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\FunctionalTests\Microsoft.Data.SqlClient.Tests.csproj" -p:Platform="Win32" -p:Configuration="Release" -p:TestTargetOS="Windowsnetfx" -p:TargetNetFxVersion=net48 --no-build -v n --filter "category!=nonnetfxtests&category!=failing&category!=nonwindowstests" -p:ReferenceType=Package -l:trx;LogFileName=..\..\..\..\..\artifacts\Results\package-net48-functional-Win32.xml
call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" -p:Platform="Win32" -p:Configuration="Release" -p:TestTargetOS="Windowsnetfx" -p:TargetNetFxVersion=net48 --no-build -v n --filter "category!=nonnetfxtests&category!=failing&category!=nonwindowstests" -p:ReferenceType=Package -l:trx;LogFileName=..\..\..\..\..\artifacts\Results\package-net48-manual-Win32.xml
-:: REFERENCE TYPE "NETSTANDARDPACKAGE"
-
-:: .NET - REFERENCE TYPE "NETSTANDARDPACKAGE"
-
-call :pauseOnError msbuild -p:Configuration="Release" -t:BuildTestsNetCore -p:ReferenceType=NetStandardPackage -p:TargetNetCoreVersion=net6.0
-call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\FunctionalTests\Microsoft.Data.SqlClient.Tests.csproj" -p:Configuration="Release" -p:TestTargetOS="Windowsnetcoreapp" --no-build -v n --filter "category!=nonnetcoreapptests&category!=failing&category!=nonwindowstests" -p:Platform="AnyCPU" -p:TargetNetCoreVersion=net6.0 -p:ReferenceType=NetStandardPackage -l:trx;LogFileName=..\..\..\..\..\artifacts\Results\netstandardpackage-net6.0-functional-anycpu.xml
-call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" -p:Configuration="Release" -p:TestTargetOS="Windowsnetcoreapp" --no-build -v n --filter "category!=nonnetcoreapptests&category!=failing&category!=nonwindowstests" -p:Platform="AnyCPU" -p:TargetNetCoreVersion=net6.0 -p:ReferenceType=NetStandardPackage -l:trx;LogFileName=..\..\..\..\..\artifacts\Results\netstandardpackage-net6.0-manual-anycpu.xml
-
-call :pauseOnError msbuild -p:Configuration="Release" -t:BuildTestsNetCore -p:ReferenceType=NetStandardPackage -p:TargetNetCoreVersion=net8.0
-call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\FunctionalTests\Microsoft.Data.SqlClient.Tests.csproj" -p:Configuration="Release" -p:TestTargetOS="Windowsnetcoreapp" --no-build -v n --filter "category!=nonnetcoreapptests&category!=failing&category!=nonwindowstests" -p:Platform="AnyCPU" -p:TargetNetCoreVersion=net8.0 -p:ReferenceType=NetStandardPackage -l:trx;LogFileName=..\..\..\..\..\artifacts\Results\netstandardpackage-net8.0-functional-anycpu.xml
-call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" -p:Configuration="Release" -p:TestTargetOS="Windowsnetcoreapp" --no-build -v n --filter "category!=nonnetcoreapptests&category!=failing&category!=nonwindowstests" -p:Platform="AnyCPU" -p:TargetNetCoreVersion=net8.0 -p:ReferenceType=NetStandardPackage -l:trx;LogFileName=..\..\..\..\..\artifacts\Results\netstandardpackage-net8.0-manual-anycpu.xml
-
-call :pauseOnError msbuild -p:Configuration="Release" -t:BuildTestsNetCore -p:ReferenceType=NetStandardPackage -p:Platform=x64 -p:TargetNetCoreVersion=net6.0
-call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\FunctionalTests\Microsoft.Data.SqlClient.Tests.csproj" -p:Configuration="Release" -p:TestTargetOS="Windowsnetcoreapp" --no-build -v n --filter "category!=nonnetcoreapptests&category!=failing&category!=nonwindowstests" -p:Platform="x64" -p:TargetNetCoreVersion=net6.0 -p:ReferenceType=NetStandardPackage -l:trx;LogFileName=..\..\..\..\..\artifacts\Results\netstandardpackage-net6.0-functional-x64.xml
-call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" -p:Configuration="Release" -p:TestTargetOS="Windowsnetcoreapp" --no-build -v n --filter "category!=nonnetcoreapptests&category!=failing&category!=nonwindowstests" -p:Platform="x64" -p:TargetNetCoreVersion=net6.0 -p:ReferenceType=NetStandardPackage -l:trx;LogFileName=..\..\..\..\..\artifacts\Results\netstandardpackage-net6.0-manual-x64.xml
-
-call :pauseOnError msbuild -p:Configuration="Release" -t:BuildTestsNetCore -p:ReferenceType=NetStandardPackage -p:Platform=x64 -p:TargetNetCoreVersion=net8.0
-call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\FunctionalTests\Microsoft.Data.SqlClient.Tests.csproj" -p:Configuration="Release" -p:TestTargetOS="Windowsnetcoreapp" --no-build -v n --filter "category!=nonnetcoreapptests&category!=failing&category!=nonwindowstests" -p:Platform="x64" -p:TargetNetCoreVersion=net8.0 -p:ReferenceType=NetStandardPackage -l:trx;LogFileName=..\..\..\..\..\artifacts\Results\netstandardpackage-net8.0-functional-x64.xml
-call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" -p:Configuration="Release" -p:TestTargetOS="Windowsnetcoreapp" --no-build -v n --filter "category!=nonnetcoreapptests&category!=failing&category!=nonwindowstests" -p:Platform="x64" -p:TargetNetCoreVersion=net8.0 -p:ReferenceType=NetStandardPackage -l:trx;LogFileName=..\..\..\..\..\artifacts\Results\netstandardpackage-net8.0-manual-x64.xml
-
-call :pauseOnError msbuild -p:Configuration="Release" -t:BuildTestsNetCore -p:ReferenceType=NetStandardPackage -p:Platform=Win32 -p:TargetNetCoreVersion=net6.0
-call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\FunctionalTests\Microsoft.Data.SqlClient.Tests.csproj" -p:Configuration="Release" -p:TestTargetOS="Windowsnetcoreapp" --no-build -v n --filter "category!=nonnetcoreapptests&category!=failing&category!=nonwindowstests" -p:Platform="Win32" -p:TargetNetCoreVersion=net6.0 -p:ReferenceType=NetStandardPackage -l:trx;LogFileName=..\..\..\..\..\artifacts\Results\netstandardpackage-net6.0-functional-win32.xml
-call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" -p:Configuration="Release" -p:TestTargetOS="Windowsnetcoreapp" --no-build -v n --filter "category!=nonnetcoreapptests&category!=failing&category!=nonwindowstests" -p:Platform="Win32" -p:TargetNetCoreVersion=net6.0 -p:ReferenceType=NetStandardPackage -l:trx;LogFileName=..\..\..\..\..\artifacts\Results\netstandardpackage-net6.0-manual-win32.xml
-
-call :pauseOnError msbuild -p:Configuration="Release" -t:BuildTestsNetCore -p:ReferenceType=NetStandardPackage -p:Platform=Win32 -p:TargetNetCoreVersion=net8.0
-call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\FunctionalTests\Microsoft.Data.SqlClient.Tests.csproj" -p:Configuration="Release" -p:TestTargetOS="Windowsnetcoreapp" --no-build -v n --filter "category!=nonnetcoreapptests&category!=failing&category!=nonwindowstests" -p:Platform="Win32" -p:TargetNetCoreVersion=net8.0 -p:ReferenceType=NetStandardPackage -l:trx;LogFileName=..\..\..\..\..\artifacts\Results\netstandardpackage-net8.0-functional-win32.xml
-call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" -p:Configuration="Release" -p:TestTargetOS="Windowsnetcoreapp" --no-build -v n --filter "category!=nonnetcoreapptests&category!=failing&category!=nonwindowstests" -p:Platform="Win32" -p:TargetNetCoreVersion=net8.0 -p:ReferenceType=NetStandardPackage -l:trx;LogFileName=..\..\..\..\..\artifacts\Results\netstandardpackage-net8.0-manual-win32.xml
-
-:: .NET Framework - REFERENCE TYPE "NETSTANDARDPACKAGE"
-
-call :pauseOnError msbuild -p:Configuration="Release" -t:BuildTestsNetFx -p:ReferenceType=NetStandardPackage -p:TargetNetFxVersion=net462
-call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\FunctionalTests\Microsoft.Data.SqlClient.Tests.csproj" -p:Configuration="Release" -p:TestTargetOS="Windowsnetfx" --no-build -v n --filter "category!=nonnetfxtests&category!=failing&category!=nonwindowstests" -p:Platform="AnyCPU" -p:TargetNetFxVersion=net462 -p:ReferenceType=NetStandardPackage -l:trx;LogFileName=..\..\..\..\..\artifacts\Results\netstandardpackage-net462-functional-anycpu.xml
-call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" -p:Configuration="Release" -p:TestTargetOS="Windowsnetfx" --no-build -v n --filter "category!=nonnetfxtests&category!=failing&category!=nonwindowstests" -p:Platform="AnyCPU" -p:TargetNetFxVersion=net462 -p:ReferenceType=NetStandardPackage -l:trx;LogFileName=..\..\..\..\..\artifacts\Results\netstandardpackage-net462-manual-anycpu.xml
-
-call :pauseOnError msbuild -p:Configuration="Release" -t:BuildTestsNetFx -p:ReferenceType=NetStandardPackage -p:TargetNetFxVersion=net48
-call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\FunctionalTests\Microsoft.Data.SqlClient.Tests.csproj" -p:Configuration="Release" -p:TestTargetOS="Windowsnetfx" --no-build -v n --filter "category!=nonnetfxtests&category!=failing&category!=nonwindowstests" -p:Platform="AnyCPU" -p:TargetNetFxVersion=net48 -p:ReferenceType=NetStandardPackage -l:trx;LogFileName=..\..\..\..\..\artifacts\Results\netstandardpackage-net48-functional-anycpu.xml
-call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" -p:Configuration="Release" -p:TestTargetOS="Windowsnetfx" --no-build -v n --filter "category!=nonnetfxtests&category!=failing&category!=nonwindowstests" -p:Platform="AnyCPU" -p:TargetNetFxVersion=net48 -p:ReferenceType=NetStandardPackage -l:trx;LogFileName=..\..\..\..\..\artifacts\Results\netstandardpackage-net48-manual-anycpu.xml
-
-call :pauseOnError msbuild -p:Configuration="Release" -t:BuildTestsNetFx -p:ReferenceType=NetStandardPackage -p:Platform=x64 -p:TargetNetFxVersion=net462
-call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\FunctionalTests\Microsoft.Data.SqlClient.Tests.csproj" -p:Configuration="Release" -p:TestTargetOS="Windowsnetfx" --no-build -v n --filter "category!=nonnetfxtests&category!=failing&category!=nonwindowstests" -p:Platform="x64" -p:TargetNetFxVersion=net462 -p:ReferenceType=NetStandardPackage -l:trx;LogFileName=..\..\..\..\..\artifacts\Results\netstandardpackage-net462-functional-x64.xml
-call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" -p:Configuration="Release" -p:TestTargetOS="Windowsnetfx" --no-build -v n --filter "category!=nonnetfxtests&category!=failing&category!=nonwindowstests" -p:Platform="x64" -p:TargetNetFxVersion=net462 -p:ReferenceType=NetStandardPackage -l:trx;LogFileName=..\..\..\..\..\artifacts\Results\netstandardpackage-net462-manual-x64.xml
-
-call :pauseOnError msbuild -p:Configuration="Release" -t:BuildTestsNetFx -p:ReferenceType=NetStandardPackage -p:Platform=x64 -p:TargetNetFxVersion=net48
-call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\FunctionalTests\Microsoft.Data.SqlClient.Tests.csproj" -p:Configuration="Release" -p:TestTargetOS="Windowsnetfx" --no-build -v n --filter "category!=nonnetfxtests&category!=failing&category!=nonwindowstests" -p:Platform="x64" -p:TargetNetFxVersion=net48 -p:ReferenceType=NetStandardPackage -l:trx;LogFileName=..\..\..\..\..\artifacts\Results\netstandardpackage-net48-functional-x64.xml
-call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" -p:Configuration="Release" -p:TestTargetOS="Windowsnetfx" --no-build -v n --filter "category!=nonnetfxtests&category!=failing&category!=nonwindowstests" -p:Platform="x64" -p:TargetNetFxVersion=net48 -p:ReferenceType=NetStandardPackage -l:trx;LogFileName=..\..\..\..\..\artifacts\Results\netstandardpackage-net48-manual-x64.xml
-
-call :pauseOnError msbuild -p:Configuration="Release" -t:BuildTestsNetFx -p:ReferenceType=NetStandardPackage -p:Platform=Win32 -p:TargetNetFxVersion=net462
-call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\FunctionalTests\Microsoft.Data.SqlClient.Tests.csproj" -p:Configuration="Release" -p:TestTargetOS="Windowsnetfx" --no-build -v n --filter "category!=nonnetfxtests&category!=failing&category!=nonwindowstests" -p:Platform="Win32" -p:TargetNetFxVersion=net462 -p:ReferenceType=NetStandardPackage -l:trx;LogFileName=..\..\..\..\..\artifacts\Results\netstandardpackage-net462-functional-win32.xml
-call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" -p:Configuration="Release" -p:TestTargetOS="Windowsnetfx" --no-build -v n --filter "category!=nonnetfxtests&category!=failing&category!=nonwindowstests" -p:Platform="Win32" -p:TargetNetFxVersion=net462 -p:ReferenceType=NetStandardPackage -l:trx;LogFileName=..\..\..\..\..\artifacts\Results\netstandardpackage-net462-manual-win32.xml
-
-call :pauseOnError msbuild -p:Configuration="Release" -t:BuildTestsNetFx -p:ReferenceType=NetStandardPackage -p:Platform=Win32 -p:TargetNetFxVersion=net48
-call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\FunctionalTests\Microsoft.Data.SqlClient.Tests.csproj" -p:Configuration="Release" -p:TestTargetOS="Windowsnetfx" --no-build -v n --filter "category!=nonnetfxtests&category!=failing&category!=nonwindowstests" -p:Platform="Win32" -p:TargetNetFxVersion=net48 -p:ReferenceType=NetStandardPackage -l:trx;LogFileName=..\..\..\..\..\artifacts\Results\netstandardpackage-net48-functional-win32.xml
-call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" -p:Configuration="Release" -p:TestTargetOS="Windowsnetfx" --no-build -v n --filter "category!=nonnetfxtests&category!=failing&category!=nonwindowstests" -p:Platform="Win32" -p:TargetNetFxVersion=net48 -p:ReferenceType=NetStandardPackage -l:trx;LogFileName=..\..\..\..\..\artifacts\Results\netstandardpackage-net48-manual-win32.xml
-
-:: REFERENCE TYPE "NETSTANDARD" (We only build and test AnyCPU with Project Reference)
-:: NUGET PACKAGE GENERATION IS NOT SUPPORTED FOR REFERNCE TYPE 'NETSTANDARD'
-call :pauseOnError msbuild -p:Configuration="Release" -p:ReferenceType=NetStandard -p:GenerateNuget=false
-call :pauseOnError msbuild -p:Configuration="Release" -t:BuildTestsNetCore -p:ReferenceType=NetStandard -p:TargetNetCoreVersion=net6.0
-call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\FunctionalTests\Microsoft.Data.SqlClient.Tests.csproj" -p:Configuration="Release" -p:TestTargetOS="Windowsnetcoreapp" --no-build -v n --filter "category!=nonnetcoreapptests&category!=failing&category!=nonwindowstests" -p:Platform="AnyCPU" -p:TargetNetCoreVersion=net6.0 -p:ReferenceType=NetStandard -l:trx;LogFileName=..\..\..\..\..\artifacts\Results\netstandard-net6.0-functional-anycpu.xml
-call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" -p:Configuration="Release" -p:TestTargetOS="Windowsnetcoreapp" --no-build -v n --filter "category!=nonnetcoreapptests&category!=failing&category!=nonwindowstests" -p:Platform="AnyCPU" -p:TargetNetCoreVersion=net6.0 -p:ReferenceType=NetStandard -l:trx;LogFileName=..\..\..\..\..\artifacts\Results\netstandard-net6.0-manual-anycpu.xml
-
-call :pauseOnError msbuild -p:Configuration="Release" -t:BuildTestsNetCore -p:ReferenceType=NetStandard -p:TargetNetCoreVersion=net8.0
-call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\FunctionalTests\Microsoft.Data.SqlClient.Tests.csproj" -p:Configuration="Release" -p:TestTargetOS="Windowsnetcoreapp" --no-build -v n --filter "category!=nonnetcoreapptests&category!=failing&category!=nonwindowstests" -p:Platform="AnyCPU" -p:TargetNetCoreVersion=net8.0 -p:ReferenceType=NetStandard -l:trx;LogFileName=..\..\..\..\..\artifacts\Results\netstandard-net8.0-functional-anycpu.xml
-call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" -p:Configuration="Release" -p:TestTargetOS="Windowsnetcoreapp" --no-build -v n --filter "category!=nonnetcoreapptests&category!=failing&category!=nonwindowstests" -p:Platform="AnyCPU" -p:TargetNetCoreVersion=net8.0 -p:ReferenceType=NetStandard -l:trx;LogFileName=..\..\..\..\..\artifacts\Results\netstandard-net8.0-manual-anycpu.xml
-
-:: TESTING 'NETSTANDARD' REFERENCE TYPE WITH .NET FRAMEWORK 4.6.2+ AS TARGET FRAMEWORK IS INVALID CASE AS PROJECT REFERENCE DOES NOT LOAD SNI.DLL IN .NET FRAMEWORK RUNTIME.
-:: CASE IS VERIFIED WITH RUNTIME.NATIVE.SYSTEM.DATA.SQLCLIENT.SNI AS WELL. TO TEST .NET FRAMEWORK TARGETS, USE 'NETSTANDARDPACKAGE' REFERENCE TYPE ONLY.
-
goto :eof
:pauseOnError
diff --git a/build.proj b/build.proj
index d500f48886..89b46fb761 100644
--- a/build.proj
+++ b/build.proj
@@ -53,7 +53,6 @@
-
@@ -62,7 +61,6 @@
-
@@ -219,12 +217,6 @@
-
-
-
-
-
-
@@ -232,10 +224,4 @@
-
-
-
-
-
-
diff --git a/doc/snippets/Microsoft.Data.SqlClient/SqlCommand.xml b/doc/snippets/Microsoft.Data.SqlClient/SqlCommand.xml
index a19cff3c8a..7b0b19f031 100644
--- a/doc/snippets/Microsoft.Data.SqlClient/SqlCommand.xml
+++ b/doc/snippets/Microsoft.Data.SqlClient/SqlCommand.xml
@@ -1385,7 +1385,8 @@ The method is a st
- Gets or sets a value indicating whether the command object should optimize parameter performance by disabling Output and InputOutput directions when submitting the command to the SQL Server.
+ Gets or sets a value indicating whether the command object should optimize parameter performance by disabling Output and InputOutput directions when submitting the command to the SQL Server.
+ This option is only used when the is Text otherwise it is ignored.
A value indicating whether the command object should optimize parameter performance by disabling Output and InputOuput parameter directions when submitting the command to the SQL Server.
diff --git a/doc/snippets/Microsoft.Data.SqlClient/SqlConnection.xml b/doc/snippets/Microsoft.Data.SqlClient/SqlConnection.xml
index 7833db6f4a..8c4e2f4607 100644
--- a/doc/snippets/Microsoft.Data.SqlClient/SqlConnection.xml
+++ b/doc/snippets/Microsoft.Data.SqlClient/SqlConnection.xml
@@ -51,7 +51,7 @@ using (SqlConnection connection = new SqlConnection(connectionString))
## Examples
- The following example creates a and a . The is opened and set as the for the . The example then calls . To accomplish this, the is passed a connection string and a query string that is a Transact-SQL INSERT statement. The connection is closed automatically when the code exits the using block.
+ The following example creates a and a . The is opened and set as the for the . The example then calls . To accomplish this, the is passed a SqlConnection and a query string that is a Transact-SQL INSERT statement. The connection is closed automatically when the code exits the using block.
[!code-csharp[SqlCommand_ExecuteNonQuery Example#1](~/../sqlclient/doc/samples/SqlCommand_ExecuteNonQuery.cs#1)]
diff --git a/doc/snippets/Microsoft.Data.SqlClient/SqlConnectionEncryptOption.xml b/doc/snippets/Microsoft.Data.SqlClient/SqlConnectionEncryptOption.xml
index 35b8d24ab6..39111465a3 100644
--- a/doc/snippets/Microsoft.Data.SqlClient/SqlConnectionEncryptOption.xml
+++ b/doc/snippets/Microsoft.Data.SqlClient/SqlConnectionEncryptOption.xml
@@ -7,7 +7,7 @@
property. When converting from a boolean, a value of `true` converts to and a value of `false` converts to . When converting to a boolean, , , and `null` convert to `true` and converts `false`.
+Implicit conversions have been added to maintain backwards compatibility with boolean behavior for the property. When converting from a boolean, a value of `true` converts to and a value of `false` converts to . When converting to a boolean, , , and `null` convert to `true` and converts `false`.
]]>
@@ -49,13 +49,13 @@ Implicit conversions have been added to maintain backwards compatibility with bo
The boolean value to be used for implicit comparison.
- Enables implicit converstion of a boolean to a . A value of converts to . A value of converts to .
+ Enables implicit conversion of a boolean to a . A value of converts to . A value of converts to .
The value to be used for implicit comparison.
- Enables implicit converstion of a to a boolean. and convert to . converts to .
+ Enables implicit conversion of a to a boolean. and convert to . converts to .
diff --git a/eng/pipelines/common/templates/jobs/build-signed-akv-package-job.yml b/eng/pipelines/common/templates/jobs/build-signed-akv-package-job.yml
new file mode 100644
index 0000000000..617f61811f
--- /dev/null
+++ b/eng/pipelines/common/templates/jobs/build-signed-akv-package-job.yml
@@ -0,0 +1,78 @@
+#################################################################################
+# 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. #
+#################################################################################
+parameters:
+ - name: symbolsFolder
+ type: string
+ default: symbols
+
+ - name: softwareFolder
+ type: string
+ default: software
+
+ - name: publishSymbols
+ type: boolean
+
+jobs:
+- job: build_signed_akv_package
+ pool:
+ type: windows # read more about custom job pool types at https://aka.ms/obpipelines/yaml/jobs
+
+ variables:
+ - template: ../../../libraries/variables.yml@self
+
+ steps:
+ - script: SET
+ displayName: 'Print Environment Variables'
+
+ - template: ../steps/build-all-configurations-signed-dlls-step.yml@self
+ parameters:
+ product: AKV
+ nugetPackageRefVersion: $(MDS_PackageRef_Version)
+ AssemblyFileVersion: $(AKVAssemblyFileVersion)
+
+ - template: ../steps/code-analyze-step.yml@self
+ parameters:
+ analyzeType: all
+ product: AKV
+ nugetPackageRefVersion: $(MDS_PackageRef_Version)
+
+ - template: ../steps/esrp-code-signing-step.yml@self
+ parameters:
+ artifactType: dll
+
+ - template: ../steps/generate-nuget-package-step.yml@self
+ parameters:
+ OutputDirectory: $(artifactDirectory)
+ nuspecPath: ${{variables.akvNuspecPath }}
+ NugetPackageVersion: ${{variables.AKVNuGetPackageVersion }}
+ referenceType: package
+
+ - template: ../steps/esrp-code-signing-step.yml@self
+ parameters:
+ artifactType: pkg
+
+ - template: ../steps/copy-dlls-for-test-step.yml@self
+ parameters:
+ product: AKV
+ referenceType: package
+
+ # Publish symbols to private server
+ - template: ../steps/publish-symbols-step.yml@self
+ parameters:
+ SymAccount: $(PrivateSymAccount)
+ referenceType: package
+ symbolsVersion: ${{variables.AKVNuGetPackageVersion }}
+ product: AKV
+ publishSymbols: ${{ parameters['PublishSymbols'] }}
+
+ # Publish symbols to public server
+ - template: ../steps/publish-symbols-step.yml@self
+ parameters:
+ SymAccount: $(PublicSymAccount)
+ referenceType: package
+ symbolsVersion: ${{variables.AKVNuGetPackageVersion }}
+ product: AKV
+ publishSymbols: ${{ parameters['PublishSymbols'] }}
diff --git a/eng/pipelines/common/templates/jobs/build-signed-package-job.yml b/eng/pipelines/common/templates/jobs/build-signed-package-job.yml
new file mode 100644
index 0000000000..6a11dbadba
--- /dev/null
+++ b/eng/pipelines/common/templates/jobs/build-signed-package-job.yml
@@ -0,0 +1,62 @@
+#################################################################################
+# 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. #
+#################################################################################
+parameters:
+ - name: symbolsFolder
+ type: string
+ default: symbols
+
+ - name: softwareFolder
+ type: string
+ default: software
+
+ - name: publishSymbols
+ type: boolean
+
+jobs:
+- job: build_signed_package
+ pool:
+ type: windows # read more about custom job pool types at https://aka.ms/obpipelines/yaml/jobs
+
+ variables:
+ - template: ../../../libraries/variables.yml@self
+
+ steps:
+ - script: SET
+ displayName: 'Print Environment Variables'
+
+ - template: ../steps/build-all-configurations-signed-dlls-step.yml@self
+
+ - template: ../steps/code-analyze-step.yml@self
+ parameters:
+ analyzeType: all
+
+ - template: ../steps/esrp-code-signing-step.yml@self
+ parameters:
+ artifactType: dll
+
+ - template: ../steps/generate-nuget-package-step.yml@self
+ parameters:
+ OutputDirectory: $(artifactDirectory)
+
+ - template: ../steps/esrp-code-signing-step.yml@self
+ parameters:
+ artifactType: pkg
+
+ - template: ../steps/copy-dlls-for-test-step.yml@self
+ parameters:
+ product: MDS
+
+ # Publish symbols to private server
+ - template: ../steps/publish-symbols-step.yml@self
+ parameters:
+ SymAccount: $(PrivateSymAccount)
+ publishSymbols: ${{ parameters['PublishSymbols'] }}
+
+ # Publish symbols to public server
+ - template: ../steps/publish-symbols-step.yml@self
+ parameters:
+ SymAccount: $(PublicSymAccount)
+ publishSymbols: ${{ parameters['PublishSymbols'] }}
diff --git a/eng/pipelines/common/templates/jobs/run-tests-package-reference-job.yml b/eng/pipelines/common/templates/jobs/run-tests-package-reference-job.yml
new file mode 100644
index 0000000000..f764a55201
--- /dev/null
+++ b/eng/pipelines/common/templates/jobs/run-tests-package-reference-job.yml
@@ -0,0 +1,58 @@
+#################################################################################
+# 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. #
+#################################################################################
+parameters:
+ - name: downloadPackageStep
+ type: step
+ default:
+ script: echo
+
+ - name: packageFolderName
+ type: string
+ default: drop_build_build_signed_package
+
+ - name: dependsOn
+ type: string
+ default: empty
+
+jobs:
+- job: run_tests_package_reference
+ ${{ if ne(parameters.dependsOn, 'empty')}}:
+ dependsOn: '${{parameters.dependsOn }}'
+ pool:
+ type: windows # read more about custom job pool types at https://aka.ms/obpipelines/yaml/jobs
+ isCustom: true
+ name: ADO-1ES-Pool
+ vmImage: 'ADO-MMS22-SQL19'
+
+ variables: # More settings at https://aka.ms/obpipelines/yaml/jobs
+ - template: ../../../libraries/mds-validation-variables.yml@self
+
+ steps:
+ - template: ../steps/pre-build-step.yml
+
+ - ${{parameters.downloadPackageStep }}
+
+ - template: ../steps/update-nuget-config-local-feed-step.yml
+ parameters:
+ downloadedNugetPath: $(Pipeline.Workspace)\${{parameters.packageFolderName }}
+
+ - template: ../steps/update-config-file-step.yml
+ parameters:
+ TCPConnectionString: $(SQL_TCP_CONN_STRING)
+ NPConnectionString: $(SQL_NP_CONN_STRING)
+ SupportsIntegratedSecurity: false
+
+ - template: ../steps/prepare-test-db-step.yml
+
+# build & test
+ - template: ../steps/build-and-run-tests-netfx-step.yml
+ parameters:
+ referenceType: Package
+
+ - template: ../steps/build-and-run-tests-netcore-step.yml
+ parameters:
+ referenceType: Package
+ cleanFirst: true
diff --git a/eng/pipelines/common/templates/jobs/validate-signed-package-job.yml b/eng/pipelines/common/templates/jobs/validate-signed-package-job.yml
new file mode 100644
index 0000000000..379f6673f1
--- /dev/null
+++ b/eng/pipelines/common/templates/jobs/validate-signed-package-job.yml
@@ -0,0 +1,299 @@
+#################################################################################
+# 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. #
+#################################################################################
+parameters:
+ - name: downloadPackageStep
+ type: step
+ default:
+ script: echo
+
+ - name: packageFolderName
+ type: string
+ default: drop_build_build_signed_package
+
+ - name: dependsOn
+ type: string
+ default: ''
+
+ - name: packageType
+ type: string
+ default: both
+ values:
+ - dll
+ - pdb
+ - both
+
+ - name: assembly_file_version_netfx
+ type: string
+ default: $(AssemblyFileVersion)
+
+ - name: assembly_file_version_core
+ type: string
+ default: $(AssemblyFileVersion)
+
+jobs:
+- job: validate_signed_package
+ ${{ if ne(parameters.dependsOn, '')}}:
+ dependsOn: '${{parameters.dependsOn }}'
+ pool:
+ type: windows # read more about custom job pool types at https://aka.ms/obpipelines/yaml/jobs
+ isCustom: true
+ name: ADO-1ES-Pool
+ vmImage: 'ADO-MMS22-SQL19'
+
+ variables: # More settings at https://aka.ms/obpipelines/yaml/jobs
+ - template: ../../../libraries/mds-validation-variables.yml@self
+
+ - name: pathToDownloadedNuget # path to the downloaded nuget files
+ value: $(Pipeline.Workspace)\${{parameters.packageFolderName }}
+
+ steps:
+ - script: SET
+ displayName: 'Print Environment Variables'
+
+ - task: NuGetToolInstaller@1
+ displayName: 'Use NuGet '
+
+ - powershell: |
+ #Sets Variables for AssemblyFileVersion, AssemblyVersion and NugetPackageVersion
+
+ [Xml] $versionprops = Get-Content -Path ".\tools\props\Versions.props"
+ Write-Host $versionprops.Project.PropertyGroup[0].AssemblyFileVersion
+
+ $AssemblyVersion = $versionprops.Project.PropertyGroup[0].AssemblyVersion
+
+ Write-Host "##vso[task.setvariable variable=ASSEMBLY_VERSION;]$AssemblyVersion"
+ displayName: 'Update assembly version property'
+
+ - powershell: |
+ # Displays the paths of all the local cache directories
+ nuget locals all -List
+
+ #Clears all files from all local cache directories
+ nuget locals all -Clear
+ displayName: 'Clear local cache'
+
+ - ${{parameters.downloadPackageStep }}
+
+ - powershell: |
+ # Install nuget package
+ Install-Package -Name "Microsoft.Data.SqlClient" -Destination "$(TempFolderName)" -Force -Source $(pathToDownloadedNuget) -SkipDependencies
+
+ Write-Host "--------------------------------------------------"
+ Write-Host '$(TempFolderName)'
+ ls $(TempFolderName)
+ Write-Host "--------------------------------------------------"
+ displayName: 'Extract Nuget in temp folder'
+
+ - powershell: |
+ # Artifact is stored in the Nuget folder
+ $packageType = '${{parameters.packageType}}'
+
+ Write-Host "--------------------------------------------------"
+ Write-Host "This will verify the artifact signature" -ForegroundColor Green
+ Write-Host "--------------------------------------------------"
+
+ if ($packageType -eq 'dll' -or $packageType -eq 'both')
+ {
+ nuget verify -All $(pathToDownloadedNuget)\*.nupkg
+ }
+ if ($packageType -eq 'pdb' -or $packageType -eq 'both')
+ {
+ nuget verify -All $(pathToDownloadedNuget)\*.snupkg
+ }
+ displayName: 'Verify nuget signature'
+
+ - powershell: |
+ # Checks the expected folder names such as lib, ref, runtimes
+ Get-ChildItem -Path $(extractedNugetPath) -Directory | select Name | foreach {
+ if('$(expectedFolderNames)'.contains($_.Name)){
+ Write-Host expected folder name verfied: $_.Name
+ }
+ }
+ displayName: 'Check expected folder names'
+
+ - powershell: |
+ # Checks the version of DotNetFramework and DotNet
+ $countErr = 0
+ $countPass = 0
+ $excludNamesFromRuntimeFolder = 'lib','win','unix'
+
+ Get-ChildItem -Path $(extractedNugetPath) -Directory | foreach {
+ $parentname=$_.Name
+ Write-Host $_.FullName -ForegroundColor yellow
+
+ if($_.Name -ne 'runtimes') {
+ Get-ChildItem -Path $_.FullName -Directory | select Name | foreach {
+ if('$(expectedDotnetVersions)'.Contains($_.Name)){
+ Write-Host "`tExpected version verified in $parentname": $_.Name -ForegroundColor green
+ $countPass += 1
+ }
+ else{
+ Write-Host "`tUnexpected version detected in $parentname": $_.Name
+ $countErr += 1
+ }
+ }
+ }
+
+ elseif ($_.Name -eq 'runtimes'){
+ Get-ChildItem -Depth 3 -Path $_.FullName -Exclude $excludNamesFromRuntimeFolder -Directory | foreach{
+ if('$(expectedDotnetVersions)'.Contains($_.Name)){
+ Write-Host "`tExpected version verfied in $parentname": $_.Name
+ $countPass += 1
+ }
+ else{
+ Write-Host "`tUnexpected version detected": $_.Name -ForegroundColor Red
+ $countErr += 1
+ }
+ }
+ }
+ else{
+ Write-Host "`tUnknown folder " $_.Name -ForegroundColor Red
+ Exit -1
+ }
+ }
+
+ Write-Host "_______________"
+ Write-Host "Expected: $countPass"
+ Write-Host "Unexpected: $countErr"
+ Write-Host "_______________"
+ if ($countErr -ne 0)
+ {
+ Write-Host "Unexpected versions are detected!" -ForegroundColor Red
+ Exit -1
+ }
+ displayName: 'Check Expected framework'
+
+ - powershell: |
+ # list all the child items of created temp folder
+
+ #Verify all DLLs unzipped match "expected" hierarchy
+
+ foreach( $folderName in (Get-ChildItem -Path $(extractedNugetPath) -Directory).Name)
+ {
+ # List all Childerns of the Path
+ Get-ChildItem -Path $(extractedNugetPath)\$folderName -Recurse -File
+ $subFiles = Get-ChildItem -Path $(extractedNugetPath)\$folderName -Recurse -File
+
+ foreach($file in $subFiles)
+ {
+ if($subFiles[0].Name -like "*.dll" )
+ {
+ Write-Host $subFiles[0].Name -ForegroundColor Green
+ Write-Host $subFiles[1].Name -ForegroundColor Green
+ if(($folderName -eq 'lib') -or ($folderName -eq 'ref'))
+ {
+ if($subFiles[2].Name -like "*.dll")
+ {
+ Write-Host $subFiles[2].Name -ForegroundColor Green
+ }
+ else
+ {
+ $subFiles[2].Name
+ Write-Host "Expected file pattern for localization did not match to *.dll" -ForegroundColor Red
+ Exit -1
+ }
+ }
+ }
+ else
+ {
+ $subFiles[0].Name
+ $subFiles[1].Name
+ Write-Host "Expected file pattern did not match to *.dll" -ForegroundColor Red
+ Exit -1
+ }
+ }
+ }
+ displayName: 'Verify all DLLs unzipped match "expected" hierarchy'
+
+ - powershell: |
+ # Verify all dlls status are Valid
+
+ $dlls = Get-ChildItem -Path $(extractedNugetPath) -Recurse -Include *.dll
+ foreach ($status in $dlls | Get-AuthenticodeSignature)
+ {
+ if ($status.Status -eq "Valid")
+ {
+ Write-Host $status.Status $status.Path
+ }
+ else
+ {
+ Write-Host "dll status of '$status.Path' is not valid!" -ForegroundColor Red
+ $status
+ Exit -1
+ }
+ }
+ displayName: 'Verify all dlls status are Valid'
+
+ - powershell: |
+ # This will check for ProductVersion and FileVersion
+ # For NetFx we have a different FileVersion, but product versions are all the same some may have and extra numbering at the end. we only check for # first parts
+
+ foreach ( $pVersion in Get-ChildItem *.dll -Path $(extractedNugetPath) -Recurse | ForEach-Object versioninfo )
+ {
+ if ($pVersion.ProductVersion -Like '$(ProductVersion)*')
+ {
+ Write-Host Valid Product Version:"$pVersion.ProductVersion" $pVersion.ProductVersion detected for $pVersion.FileName -ForegroundColor Green
+ }
+ else
+ {
+ Write-Host "Wrong ProductVersion detected. Expected: '$(ProductVersion)', but Detected: "$pVersion.ProductVersion""
+ Exit -1
+ }
+
+ if($pVersion.FileName -like '*lib\$(CurrentNetFxVersion)*'){
+
+ if($pVersion.FileVersion -eq '${{parameters.assembly_file_version_netfx }}')
+ {
+ Write-Host 'Correct File version Detected for net46,' $pVersion.FileVersion -ForegroundColor Green
+ }
+ else
+ {
+ Write-Host 'Wrong File version Detected for net46,' $pVersion.FileVersion -ForegroundColor Red
+ Exit -1
+ }
+ }
+ else
+ {
+
+ if($pVersion.FileVersion -eq '${{parameters.assembly_file_version_core}}')
+ {
+ Write-Host 'Correct File version Detected for netcore,' $pVersion.FileVersion -ForegroundColor Green
+ }
+ else
+ {
+ Write-Host 'Wrong File version Detected for netcore and ref folder,' $pVersion.FileVersion -ForegroundColor Red
+ Exit -1
+ }
+ }
+ }
+
+ Get-ChildItem *.dll -Path $(extractedNugetPath) -Recurse | ForEach-Object versioninfo
+ displayName: 'Verify "File Version" matches provided pipeline variable "ASSEMBLY_FILE_VERSION" for DLLs'
+
+ - powershell: |
+ #Change TestMicrosoftDataSqlClientVersion
+
+ [Xml] $versionprops = Get-Content -Path "tools/props/Versions.props"
+ $versionpropspath = "tools\props\Versions.props"
+ $versionprops.Project.PropertyGroup[$versionprops.Project.PropertyGroup.Count-1].TestMicrosoftDataSqlClientVersion ="$(NugetPackageVersion)"
+ Write-Host "Saving Test nuget version at $rootfolder\props ...." -ForegroundColor Green
+ $versionprops.Save($versionpropspath)
+
+ displayName: 'Modify TestMicrosoftDataSqlClientVersion'
+
+ - powershell: |
+ #Change TestMicrosoftDataSqlClientVersion
+
+ [Xml] $versionprops = Get-Content -Path "tools/props/Versions.props"
+ $AssemblyFileVersion = $versionprops.Project.PropertyGroup[0].AssemblyFileVersion
+ $AssemblyVersion = $versionprops.Project.PropertyGroup[0].AssemblyVersion
+
+ if($AssemblyFileVersion -eq $AssemblyVersion)
+ {
+ Write-Host AssemblyFileVersion: $AssemblyFileVersion should not be equal to: $AssemblyVersion
+ Exit -1
+ }
+ displayName: 'Check "AssemblyFileVersion" is not same as "AssemblyVersion" in version.props'
diff --git a/eng/pipelines/common/templates/steps/build-all-configurations-signed-dlls-step.yml b/eng/pipelines/common/templates/steps/build-all-configurations-signed-dlls-step.yml
new file mode 100644
index 0000000000..5be79793fd
--- /dev/null
+++ b/eng/pipelines/common/templates/steps/build-all-configurations-signed-dlls-step.yml
@@ -0,0 +1,54 @@
+#################################################################################
+# 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. #
+#################################################################################
+parameters:
+ - name: AssemblyFileVersion
+ type: string
+ default: $(AssemblyFileVersion)
+
+ - name: Configuration
+ type: string
+ default: '$(Configuration)'
+
+ - name: nugetPackageRefVersion
+ type: string
+ default: ''
+
+ - name: product
+ default: MDS
+ values:
+ - MDS
+ - AKV
+ - MSS
+
+steps:
+- task: DownloadSecureFile@1
+ displayName: 'Download Key Pair'
+ inputs:
+ secureFile: netfxKeypair.snk
+ retryCount: 5
+
+- ${{ if eq(parameters.product, 'MDS') }}:
+ - task: MSBuild@1
+ displayName: 'BuildAllConfigurations using build.proj'
+ inputs:
+ solution: '**/build.proj'
+ configuration: '${{parameters.Configuration }}'
+ msbuildArguments: '-p:AssemblyFileVersion=${{parameters.AssemblyFileVersion }} -t:BuildAllConfigurations -p:GenerateNuget=false -p:SignAssembly=true -p:AssemblyOriginatorKeyFile=$(Agent.TempDirectory)\netfxKeypair.snk'
+
+- ${{ if eq(parameters.product, 'AKV') }}:
+ - task: MSBuild@1
+ displayName: 'BuildAKVNetFx using build.proj'
+ inputs:
+ solution: '**/build.proj'
+ configuration: '$(Configuration)'
+ msbuildArguments: '-p:AssemblyFileVersion=${{parameters.AssemblyFileVersion }} -t:BuildAKVNetFx -p:NugetPackageVersion=${{parameters.nugetPackageRefVersion }} -p:ReferenceType=Package -p:SignAssembly=true -p:AssemblyOriginatorKeyFile=$(Agent.TempDirectory)\netfxKeypair.snk'
+
+ - task: MSBuild@1
+ displayName: 'BuildAKVNetCoreAllOS using build.proj'
+ inputs:
+ solution: '**/build.proj'
+ configuration: '$(Configuration)'
+ msbuildArguments: '-p:AssemblyFileVersion=${{parameters.AssemblyFileVersion }} -t:BuildAKVNetCoreAllOS -p:NugetPackageVersion=${{parameters.nugetPackageRefVersion }} -p:ReferenceType=Package -p:SignAssembly=true -p:AssemblyOriginatorKeyFile=$(Agent.TempDirectory)\netfxKeypair.snk'
diff --git a/eng/pipelines/common/templates/steps/build-and-run-tests-netcore-step.yml b/eng/pipelines/common/templates/steps/build-and-run-tests-netcore-step.yml
new file mode 100644
index 0000000000..f747fa57e6
--- /dev/null
+++ b/eng/pipelines/common/templates/steps/build-and-run-tests-netcore-step.yml
@@ -0,0 +1,80 @@
+#################################################################################
+# 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. #
+#################################################################################
+parameters:
+ - name: TargetNetCoreVersion
+ type: string
+ default: $(TargetNetCoreVersion)
+
+ - name: configuration
+ type: string
+ default: $(Configuration)
+
+ - name: referenceType
+ default: Project
+ values:
+ - Project
+ - Package
+
+ - name: NugetPackageVersion
+ type: string
+ default: $(NugetPackageVersion)
+
+ - name: platform
+ type: string
+ default: $(Platform)
+
+ - name: cleanFirst
+ type: boolean
+ default: false
+
+ - name: TestTargetOS
+ type: string
+ default: Windowsnetcoreapp
+ values:
+ - Windowsnetfx
+ - Windowsnetcoreapp
+ - Unixnetcoreapp
+
+ - name: retryCountOnManualTests
+ type: number
+ default: 2
+
+steps:
+- ${{ if eq(parameters.cleanFirst, true)}}:
+ - task: MSBuild@1
+ displayName: 'Clean artifacts folder'
+ inputs:
+ solution: build.proj
+ msbuildArguments: '-t:clean'
+
+- task: MSBuild@1
+ displayName: 'Build AKV Provider .NET'
+ inputs:
+ solution: build.proj
+ msbuildArchitecture: x64
+ msbuildArguments: '-p:Configuration=${{parameters.configuration }} -t:BuildAKVNetCore -p:ReferenceType=${{parameters.referenceType }} '
+
+- task: MSBuild@1
+ displayName: 'MSBuild Build Tests for ${{parameters.TargetNetCoreVersion }}'
+ inputs:
+ solution: build.proj
+ msbuildArchitecture: x64
+ msbuildArguments: '-t:BuildTestsNetCore -p:ReferenceType=${{parameters.referenceType }} -p:TargetNetCoreVersion=${{parameters.TargetNetCoreVersion }} -p:TestMicrosoftDataSqlClientVersion=${{parameters.NugetPackageVersion }} -p:Configuration=${{parameters.configuration }}'
+
+- task: DotNetCoreCLI@2
+ displayName: 'Run Functional Tests for ${{parameters.TargetNetCoreVersion }}'
+ inputs:
+ command: test
+ projects: 'src\Microsoft.Data.SqlClient\tests\FunctionalTests\Microsoft.Data.SqlClient.Tests.csproj'
+ arguments: '-p:Platform=${{parameters.platform }} -p:TestTargetOS="${{parameters.TestTargetOS }}" -p:TargetNetCoreVersion=${{parameters.TargetNetCoreVersion }} -p:ReferenceType=${{parameters.referenceType }} -p:Configuration=${{parameters.configuration }} -p:TestMicrosoftDataSqlClientVersion=${{parameters.NugetPackageVersion }} --no-build -v n --filter "category!=nonnetcoreapptests&category!=failing&category!=nonwindowstests"'
+
+- task: DotNetCoreCLI@2
+ displayName: 'Run Manual Tests for ${{parameters.TargetNetCoreVersion }}'
+ inputs:
+ command: test
+ projects: 'src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj'
+ arguments: '-p:Platform=${{parameters.platform }} -p:TestTargetOS="${{parameters.TestTargetOS }}" -p:TargetNetCoreVersion=${{parameters.TargetNetCoreVersion }} -p:ReferenceType=${{parameters.referenceType }} -p:Configuration=${{parameters.configuration }} -p:TestMicrosoftDataSqlClientVersion=${{parameters.NugetPackageVersion }} --no-build -v n --filter category!=nonnetcoreapptests&category!=failing&category!=nonwindowstests --collect "Code Coverage"'
+ retryCountOnTaskFailure: ${{parameters.retryCountOnManualTests }}
diff --git a/eng/pipelines/common/templates/steps/build-and-run-tests-netfx-step.yml b/eng/pipelines/common/templates/steps/build-and-run-tests-netfx-step.yml
new file mode 100644
index 0000000000..ab77af3ee9
--- /dev/null
+++ b/eng/pipelines/common/templates/steps/build-and-run-tests-netfx-step.yml
@@ -0,0 +1,79 @@
+#################################################################################
+# 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. #
+#################################################################################
+parameters:
+ - name: TargetNetFxVersion
+ type: string
+ default: $(TargetNetFxVersion)
+
+ - name: configuration
+ type: string
+ default: $(Configuration)
+
+ - name: referenceType
+ default: Project
+ values:
+ - Project
+ - Package
+
+ - name: NugetPackageVersion
+ type: string
+ default: $(NugetPackageVersion)
+
+ - name: platform
+ type: string
+ default: $(Platform)
+
+ - name: cleanFirst
+ type: boolean
+ default: false
+
+ - name: TestTargetOS
+ type: string
+ default: Windowsnetfx
+ values:
+ - Windowsnetfx
+ - Windowsnetcoreapp
+ - Unixnetcoreapp
+
+ - name: retryCountOnManualTests
+ type: number
+ default: 2
+
+steps:
+- ${{ if eq(parameters.cleanFirst, true)}}:
+ - task: MSBuild@1
+ displayName: 'Clean artifacts folder'
+ inputs:
+ solution: build.proj
+ msbuildArguments: '-t:clean'
+
+- task: MSBuild@1
+ displayName: 'Build AKV Provider .NET Framework'
+ inputs:
+ solution: build.proj
+ msbuildArchitecture: x64
+ msbuildArguments: '-p:Configuration=${{parameters.configuration }} -t:BuildAKVNetFx -p:ReferenceType=${{parameters.referenceType }} '
+
+- task: MSBuild@1
+ displayName: 'MSBuild Build Tests for ${{parameters.TargetNetFxVersion }}'
+ inputs:
+ solution: build.proj
+ msbuildArguments: ' -t:BuildTestsNetFx -p:ReferenceType=${{parameters.referenceType }} -p:TestMicrosoftDataSqlClientVersion=${{parameters.NugetPackageVersion }} -p:TargetNetFxVersion=${{parameters.TargetNetFxVersion }} -p:Configuration=${{parameters.configuration }} -p:Platform=${{parameters.platform }}'
+
+- task: DotNetCoreCLI@2
+ displayName: 'Run Functional Tests for ${{parameters.TargetNetFxVersion }}'
+ inputs:
+ command: test
+ projects: 'src\Microsoft.Data.SqlClient\tests\FunctionalTests\Microsoft.Data.SqlClient.Tests.csproj'
+ arguments: '-p:Platform=${{parameters.platform }} -p:TestTargetOS="${{parameters.TestTargetOS }}" -p:TargetNetFxVersion=${{parameters.TargetNetFxVersion }} -p:ReferenceType=${{parameters.referenceType }} -p:Configuration=${{parameters.configuration }} -p:TestMicrosoftDataSqlClientVersion=${{parameters.NugetPackageVersion }} --no-build -v n --filter "category!=nonnetfxtests&category!=failing&category!=nonwindowstests" --collect "Code Coverage"'
+
+- task: DotNetCoreCLI@2
+ displayName: 'Run Manual Tests for ${{parameters.TargetNetFxVersion }}'
+ inputs:
+ command: test
+ projects: 'src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj'
+ arguments: '-p:Platform=${{parameters.platform }} -p:TestTargetOS="${{parameters.TestTargetOS }}" -p:TargetNetFxVersion=${{parameters.TargetNetFxVersion }} -p:ReferenceType=${{parameters.referenceType }} -p:Configuration=${{parameters.configuration }} -p:TestMicrosoftDataSqlClientVersion=${{parameters.NugetPackageVersion }} --no-build -v n --filter "category!=nonnetfxtests&category!=failing&category!=nonwindowstests" --collect "Code Coverage"'
+ retryCountOnTaskFailure: ${{parameters.retryCountOnManualTests }}
diff --git a/eng/pipelines/common/templates/steps/code-analyze-step.yml b/eng/pipelines/common/templates/steps/code-analyze-step.yml
new file mode 100644
index 0000000000..92be8eabf6
--- /dev/null
+++ b/eng/pipelines/common/templates/steps/code-analyze-step.yml
@@ -0,0 +1,51 @@
+#################################################################################
+# 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. #
+#################################################################################
+parameters:
+ - name: analyzeType
+ values:
+ - roslyn
+ - inspect
+ - all
+
+ - name: sourceRoot
+ type: string
+ default: $(REPOROOT)
+
+ - name: nugetPackageRefVersion
+ type: string
+ default: ''
+
+ - name: product
+ default: MDS
+ values:
+ - MDS
+ - AKV
+ - MSS
+
+steps:
+- ${{ if or(eq(parameters.analyzeType, 'roslyn'), eq(parameters.analyzeType, 'all')) }}:
+ - ${{ if eq(parameters.product, 'MDS') }}:
+ - task: securedevelopmentteam.vss-secure-development-tools.build-task-roslynanalyzers.RoslynAnalyzers@3
+ displayName: 'Guardian Dotnet Analyzers '
+ inputs:
+ msBuildVersion: 17.0
+ msBuildArchitecture: x64
+ setupCommandlinePicker: vs2022
+ msBuildCommandline: 'msbuild ${{parameters.sourceRoot}}\build.proj -p:configuration=Release -p:GenerateNuget=false -p:BuildTools=false'
+ - ${{ if eq(parameters.product, 'AKV') }}:
+ - task: securedevelopmentteam.vss-secure-development-tools.build-task-roslynanalyzers.RoslynAnalyzers@3
+ displayName: 'Guardian Dotnet Analyzers '
+ inputs:
+ msBuildVersion: 17.0
+ msBuildArchitecture: x64
+ setupCommandlinePicker: vs2022
+ msBuildCommandline: 'msbuild ${{parameters.sourceRoot}}\build.proj -p:configuration=Release -p:GenerateNuget=false -p:BuildTools=false -p:NugetPackageVersion=${{parameters.nugetPackageRefVersion }} -p:ReferenceType=Package -t:BuildAKVNetCoreAllOS'
+
+- ${{ if or(eq(parameters.analyzeType, 'inspect'), eq(parameters.analyzeType, 'all')) }}:
+ - task: securedevelopmentteam.vss-secure-development-tools.build-task-codeinspector.CodeInspector@2
+ displayName: 'Run Code Inspector'
+ inputs:
+ LogLevel: Error
diff --git a/eng/pipelines/common/templates/steps/copy-dlls-for-test-step.yml b/eng/pipelines/common/templates/steps/copy-dlls-for-test-step.yml
new file mode 100644
index 0000000000..faf54fc24d
--- /dev/null
+++ b/eng/pipelines/common/templates/steps/copy-dlls-for-test-step.yml
@@ -0,0 +1,106 @@
+#################################################################################
+# 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. #
+#################################################################################
+parameters:
+ - name: Configuration
+ type: string
+ default: '$(Configuration)'
+
+ - name: symbolsFolder
+ type: string
+ default: symbols
+
+ - name: softwareFolder
+ type: string
+ default: software
+
+ - name: referenceType
+ default: project
+ values:
+ - project
+ - package
+
+ - name: listOfTF
+ type: object
+ default:
+ - net462
+ - net6.0
+ - net8.0
+
+ - name: product
+ default: MDS
+ values:
+ - MDS
+ - AKV
+ - MSS
+
+steps:
+- powershell: |
+ $software = '${{parameters.softwareFolder}}'
+ $symbols = '${{parameters.symbolsFolder}}'
+
+ md $software
+ md $software\win
+
+ md $symbols
+ md $symbols\win
+ displayName: 'Make base directories'
+
+- ${{ each targetFramework in parameters.listOfTF }}:
+ - ${{ if eq(parameters.product, 'MDS') }}:
+ - powershell: |
+ $software = '${{parameters.softwareFolder}}'
+ $tf = '${{ targetFramework }}'
+ md $software\win\$tf
+
+ if ($tf.StartsWith('net4'))
+ {
+ Copy-Item "artifacts\${{parameters.referenceType }}\bin\Windows_NT\${{parameters.Configuration }}.AnyCPU\Microsoft.Data.SqlClient\netfx\$tf\Microsoft.Data.SqlClient.dll" "$software\win\$tf" -recurse
+ }
+ else
+ {
+ Copy-Item "artifacts\${{parameters.referenceType }}\bin\Windows_NT\${{parameters.Configuration }}.AnyCPU\Microsoft.Data.SqlClient\netcore\$tf\Microsoft.Data.SqlClient.dll" "$software\win\$tf" -recurse
+ }
+
+ $symbols = '${{parameters.symbolsFolder}}'
+ md $symbols\win\$tf
+
+ if ($tf.StartsWith('net4'))
+ {
+ Copy-Item "artifacts\Project\bin\Windows_NT\Release.AnyCPU\Microsoft.Data.SqlClient\netfx\$tf\Microsoft.Data.SqlClient.pdb" "$symbols\win\$tf" -recurse
+ }
+ else
+ {
+ Copy-Item "artifacts\Project\bin\Windows_NT\Release.AnyCPU\Microsoft.Data.SqlClient\netcore\$tf\Microsoft.Data.SqlClient.pdb" "$symbols\win\$tf" -recurse
+ }
+
+ Write-Host "Artifacts fetched for testing"
+ Get-Location
+ displayName: 'Prepare ${{ targetFramework }} Arifacts for Testing'
+
+ - ${{ if eq(parameters.product, 'AKV') }}:
+ - powershell: |
+ $software = '${{parameters.softwareFolder}}'
+ $tf = '${{ targetFramework }}'
+ md $software\win\$tf
+
+ Copy-Item "artifacts\${{parameters.referenceType }}\bin\Windows_NT\${{parameters.Configuration }}.AnyCPU\AzureKeyVaultProvider\$tf\Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider.dll" "$software\win\$tf" -recurse
+
+ $symbols = '${{parameters.symbolsFolder}}'
+ md $symbols\win\$tf
+
+ Copy-Item "artifacts\${{parameters.referenceType }}\bin\Windows_NT\${{parameters.Configuration }}.AnyCPU\AzureKeyVaultProvider\$tf\Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider.pdb" "$symbols\win\$tf" -recurse
+
+ Write-Host "Artifacts fetched for testing"
+ Get-Location
+ displayName: 'Prepare ${{ targetFramework }} Arifacts for Testing'
+
+- powershell: |
+ $software = '${{parameters.softwareFolder}}'
+ $symbols = '${{parameters.symbolsFolder}}'
+
+ Get-ChildItem -recurse "$software\*.dll"
+ Get-ChildItem -recurse "$symbols\*.pdb"
+ displayName: 'List the prepared files'
diff --git a/eng/pipelines/common/templates/steps/esrp-code-signing-step.yml b/eng/pipelines/common/templates/steps/esrp-code-signing-step.yml
new file mode 100644
index 0000000000..02b9487cc3
--- /dev/null
+++ b/eng/pipelines/common/templates/steps/esrp-code-signing-step.yml
@@ -0,0 +1,106 @@
+#################################################################################
+# 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. #
+#################################################################################
+parameters:
+ - name: artifactType
+ values:
+ - dll
+ - pkg
+
+ - name: sourceRoot
+ type: string
+ default: $(REPOROOT)
+
+ - name: artifactDirectory
+ type: string
+ default: $(artifactDirectory)
+
+steps:
+- ${{ if eq(parameters.artifactType, 'dll') }}:
+ - task: SFP.build-tasks.custom-build-task-2.EsrpMalwareScanning@4
+ displayName: 'ESRP MalwareScanning'
+ inputs:
+ ConnectedServiceName: 'SqlClient ESRP Malware Scanning'
+ FolderPath: '${{parameters.sourceRoot }}'
+ Pattern: '*.dll'
+ Region: US
+ - task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@4
+ displayName: 'ESRP CodeSigning'
+ inputs:
+ ConnectedServiceName: 'SqlClient ESRP Code Signing'
+ FolderPath: '${{parameters.sourceRoot }}'
+ Pattern: '*.dll'
+ signConfigType: inlineSignParams
+ inlineOperation: |
+ [
+ {
+ "keyCode": "CP-230012",
+ "operationSetCode": "SigntoolSign",
+ "parameters": [
+ {
+ "parameterName": "OpusName",
+ "parameterValue": "Microsoft Data SqlClient Data Provider for SQL Server"
+ },
+ {
+ "parameterName": "OpusInfo",
+ "parameterValue": "http://www.microsoft.com"
+ },
+ {
+ "parameterName": "FileDigest",
+ "parameterValue": "/fd \"SHA256\""
+ },
+ {
+ "parameterName": "PageHash",
+ "parameterValue": "/NPH"
+ },
+ {
+ "parameterName": "TimeStamp",
+ "parameterValue": "/tr \"http://rfc3161.gtm.corp.microsoft.com/TSS/HttpTspServer\" /td sha256"
+ }
+ ],
+ "toolName": "sign",
+ "toolVersion": "1.0"
+ },
+ {
+ "keyCode": "CP-230012",
+ "operationSetCode": "SigntoolVerify",
+ "parameters": [ ],
+ "toolName": "sign",
+ "toolVersion": "1.0"
+ }
+ ]
+
+- ${{ if eq(parameters.artifactType, 'pkg') }}:
+ - task: SFP.build-tasks.custom-build-task-2.EsrpMalwareScanning@4
+ displayName: 'ESRP MalwareScanning Nuget Package'
+ inputs:
+ ConnectedServiceName: 'SqlClient ESRP Malware Scanning'
+ FolderPath: '${{parameters.artifactDirectory }}'
+ Pattern: '*.*nupkg'
+ Region: US
+ - task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@4
+ displayName: 'ESRP CodeSigning Nuget Package'
+ inputs:
+ ConnectedServiceName: 'SqlClient ESRP Code Signing'
+ FolderPath: '${{parameters.artifactDirectory }}'
+ Pattern: '*.*nupkg'
+ signConfigType: inlineSignParams
+ inlineOperation: |
+ [
+ {
+ "keyCode": "CP-401405",
+ "operationSetCode": "NuGetSign",
+ "parameters": [ ],
+ "toolName": "sign",
+ "toolVersion": "1.0"
+ },
+ {
+ "keyCode": "CP-401405",
+ "operationSetCode": "NuGetVerify",
+ "parameters": [ ],
+ "toolName": "sign",
+ "toolVersion": "1.0"
+ }
+ ]
diff --git a/eng/pipelines/common/templates/steps/generate-nuget-package-step.yml b/eng/pipelines/common/templates/steps/generate-nuget-package-step.yml
new file mode 100644
index 0000000000..d97229089a
--- /dev/null
+++ b/eng/pipelines/common/templates/steps/generate-nuget-package-step.yml
@@ -0,0 +1,42 @@
+#################################################################################
+# 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. #
+#################################################################################
+parameters:
+ - name: nuspecPath
+ type: string
+ default: '$(nuspecPath)'
+
+ - name: NugetPackageVersion
+ type: string
+ default: '$(NugetPackageVersion)'
+
+ - name: OutputDirectory
+ type: string
+ default: '$(Build.SourcesDirectory)/packages'
+
+ - name: Configuration
+ type: string
+ default: '$(Configuration)'
+
+ - name: referenceType
+ default: project
+ values:
+ - project
+ - package
+
+steps:
+- task: NuGetToolInstaller@1
+ displayName: 'Install Latest Nuget'
+ inputs:
+ checkLatest: true
+- powershell: |
+ $Commit=git rev-parse HEAD
+ Write-Host "##vso[task.setvariable variable=CommitHead;]$Commit"
+ displayName: CommitHead
+- task: NuGetCommand@2
+ displayName: 'NuGet pack with snupkg'
+ inputs:
+ command: custom
+ arguments: 'pack -Symbols -SymbolPackageFormat snupkg ${{parameters.nuspecPath}} -Version ${{parameters.NugetPackageVersion}} -OutputDirectory ${{parameters.OutputDirectory}} -properties "COMMITID=$(CommitHead);Configuration=${{parameters.Configuration}};ReferenceType=${{parameters.referenceType}}"'
diff --git a/eng/pipelines/common/templates/steps/pre-build-step.yml b/eng/pipelines/common/templates/steps/pre-build-step.yml
new file mode 100644
index 0000000000..327b5f21a5
--- /dev/null
+++ b/eng/pipelines/common/templates/steps/pre-build-step.yml
@@ -0,0 +1,20 @@
+#################################################################################
+# 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. #
+#################################################################################
+steps:
+- script: SET
+ displayName: 'Print Environment Variables'
+
+- powershell: |
+ # use sqlcmd to try to connect to localdb
+ $svc_name = "SQLBrowser"
+ Get-Service $svc_name | Select-Object -Property Name, StartType, Status
+ Set-Service -StartupType Automatic $svc_name
+ net start $svc_name
+ Get-Service $svc_name | Select-Object -Property Name, StartType, Status
+ displayName: 'Start SQLBrowser'
+
+- task: NuGetToolInstaller@1
+ displayName: 'Use NuGet '
diff --git a/eng/pipelines/common/templates/steps/prepare-test-db-step.yml b/eng/pipelines/common/templates/steps/prepare-test-db-step.yml
new file mode 100644
index 0000000000..8597a0c9e5
--- /dev/null
+++ b/eng/pipelines/common/templates/steps/prepare-test-db-step.yml
@@ -0,0 +1,26 @@
+#################################################################################
+# 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. #
+#################################################################################
+parameters:
+ - name: databaseName
+ type: string
+ default: $(Database)
+
+ - name: targetFramework
+ type: string
+ default: net6.0
+
+steps:
+- task: DotNetCoreCLI@2
+ displayName: 'Build Ext Utilities'
+ inputs:
+ arguments: '-f ${{parameters.targetFramework }}'
+ workingDirectory: src/Microsoft.Data.SqlClient/tests/tools/Microsoft.Data.SqlClient.ExtUtilities
+- task: DotNetCoreCLI@2
+ displayName: 'Create Test Database'
+ inputs:
+ command: run
+ arguments: '-f ${{parameters.targetFramework }} -- "CreateDatabase" ${{parameters.databaseName }} '
+ workingDirectory: src/Microsoft.Data.SqlClient/tests/tools/Microsoft.Data.SqlClient.ExtUtilities
diff --git a/eng/pipelines/common/templates/steps/publish-symbols-step.yml b/eng/pipelines/common/templates/steps/publish-symbols-step.yml
new file mode 100644
index 0000000000..5898fddd4a
--- /dev/null
+++ b/eng/pipelines/common/templates/steps/publish-symbols-step.yml
@@ -0,0 +1,64 @@
+#################################################################################
+# 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. #
+#################################################################################
+parameters:
+ - name: SymAccount
+ type: string
+
+ - name: publishSymbols
+ type: string
+ default: '$(PublishSymbols)'
+
+ - name: symbolsVersion
+ type: string
+ default: '$(NuGetPackageVersion)'
+
+ - name: referenceType
+ default: project
+ values:
+ - project
+ - package
+
+ - name: product
+ default: MDS
+ values:
+ - MDS
+ - AKV
+ - MSS
+
+steps:
+- powershell: 'Write-Host "##vso[task.setvariable variable=ArtifactServices.Symbol.AccountName;]${{parameters.SymAccount}}"'
+ displayName: 'Update Symbol.AccountName ${{parameters.SymAccount}}'
+ condition: and(succeeded(), ${{ eq(parameters.publishSymbols, 'true') }})
+
+- ${{ if eq(parameters.product, 'MDS') }}:
+ - task: PublishSymbols@2
+ displayName: 'Publish symbols path'
+ inputs:
+ SymbolsFolder: '$(Build.SourcesDirectory)\artifacts\${{parameters.referenceType }}\bin'
+ SearchPattern: |
+ Windows_NT/$(Configuration).AnyCPU/**/Microsoft.Data.SqlClient.pdb
+ Unix/$(Configuration).AnyCPU/**/Microsoft.Data.SqlClient.pdb
+ IndexSources: false
+ SymbolServerType: TeamServices
+ SymbolsMaximumWaitTime: 60
+ SymbolsProduct: Microsoft.Data.SqlClient
+ SymbolsVersion: '{{parameters.symbolsVersion }}'
+ condition: and(succeeded(), ${{ eq(parameters.publishSymbols, 'true') }})
+
+- ${{ if eq(parameters.product, 'AKV') }}:
+ - task: PublishSymbols@2
+ displayName: 'Publish symbols path'
+ inputs:
+ SymbolsFolder: '$(Build.SourcesDirectory)\artifacts\${{parameters.referenceType }}\bin'
+ SearchPattern: |
+ Windows_NT/$(Configuration).AnyCPU/AzureKeyVaultProvider/**/Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider.pdb
+ AnyOS/$(Configuration).AnyCPU/AzureKeyVaultProvider/**/Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider.pdb
+ IndexSources: false
+ SymbolServerType: TeamServices
+ SymbolsMaximumWaitTime: 60
+ SymbolsProduct: Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider
+ SymbolsVersion: '{{parameters.symbolsVersion }}'
+ condition: and(succeeded(), ${{ eq(parameters.publishSymbols, 'true') }})
diff --git a/eng/pipelines/common/templates/steps/update-config-file-step.yml b/eng/pipelines/common/templates/steps/update-config-file-step.yml
new file mode 100644
index 0000000000..2530f35d23
--- /dev/null
+++ b/eng/pipelines/common/templates/steps/update-config-file-step.yml
@@ -0,0 +1,35 @@
+#################################################################################
+# 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. #
+#################################################################################
+parameters:
+ - name: TCPConnectionString
+ type: string
+ default: ''
+
+ - name: NPConnectionString
+ type: string
+ default: ''
+
+ - name: SupportsIntegratedSecurity
+ type: boolean
+ default: false
+
+steps:
+# All properties should be added here, and this template should be used for any manipulation of the config.json file.
+- powershell: |
+ $jdata = Get-Content -Raw "config.default.json" | ConvertFrom-Json
+ foreach ($p in $jdata)
+ {
+ if ("${{parameters.TCPConnectionString }}" -ne ""){
+ $p.TCPConnectionString="${{parameters.TCPConnectionString }}"}
+
+ if ("${{parameters.NPConnectionString }}" -ne ""){
+ $p.NPConnectionString="${{parameters.NPConnectionString }}"}
+
+ $p.SupportsIntegratedSecurity=[System.Convert]::ToBoolean("${{parameters.SupportsIntegratedSecurity }}")
+ }
+ $jdata | ConvertTo-Json | Set-Content "config.json"
+ workingDirectory: src/Microsoft.Data.SqlClient/tests/tools/Microsoft.Data.SqlClient.TestUtilities
+ displayName: 'Update config.json'
diff --git a/eng/pipelines/common/templates/steps/update-nuget-config-local-feed-step.yml b/eng/pipelines/common/templates/steps/update-nuget-config-local-feed-step.yml
new file mode 100644
index 0000000000..5258a3941d
--- /dev/null
+++ b/eng/pipelines/common/templates/steps/update-nuget-config-local-feed-step.yml
@@ -0,0 +1,78 @@
+#################################################################################
+# 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. #
+#################################################################################
+parameters:
+ - name: downloadedNugetPath # path to the downloaded nuget files
+ type: string
+
+ - name: nugetPackageVersion
+ type: string
+ default: $(NugetPackageVersion)
+
+steps:
+- powershell: |
+ # Get a list of package sources available
+ Get-PackageSource
+
+ #Current location
+ Get-Location
+
+ # Register the local nuget folder to be used by nuget.config
+ Register-PackageSource -Name "Package Source" -Location ${{parameters.downloadedNugetPath }} -Force -ProviderName NuGet -Trusted
+
+ # Get a list of package sources available after the change
+ Get-PackageSource
+
+ #Set the Nuget.config file in the project to use extracted package
+ $rootFolder = Get-location
+ [Xml] $nugetConfig = Get-Content -Path "Nuget.config"
+ $Value = Resolve-Path ${{parameters.downloadedNugetPath }}
+ $newAdd = $nugetConfig.CreateElement("add")
+ $newAdd.SetAttribute("key","Package source")
+ $newAdd.SetAttribute("value", "$Value\" )
+ $nugetConfig.configuration.packageSources.AppendChild($newAdd)
+ $nugetConfig.Save("$rootFolder\Nuget.config")
+ displayName: 'Update NuGet config file to read from Nuget folder'
+
+- task: MSBuild@1
+ displayName: 'Restore nugets'
+ inputs:
+ solution: build.proj
+ msbuildArchitecture: x64
+ msbuildArguments: '-t:restore'
+
+- powershell: |
+ $Doc = [xml](Get-Content ".\Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider.csproj")
+ $parent_xpath = '/Project/ItemGroup/ProjectReference'
+ $node = $Doc.SelectSingleNode($parent_xpath)
+ $parentNode = $node.ParentNode
+ while($node -ne $null) {
+ $node.ParentNode.RemoveChild($node)
+ $node = $Doc.SelectSingleNode($parent_xpath)
+ }
+
+ $parent_xpath = '/Project/ItemGroup/PackageReference[@Include="Microsoft.Data.SqlClient"]'
+ $node = $Doc.SelectSingleNode($parent_xpath)
+
+ if($node -ne $null){
+ $node.Version="${{parameters.nugetPackageVersion }}"
+ }
+ else{
+ $packagerefnode = $doc.createelement("packagereference")
+ $value = $doc.selectsinglenode('/project/itemgroup/projectreference')
+ $attrinclude = $doc.createattribute("include")
+ $attrinclude.value = "microsoft.data.sqlclient"
+ $attrversion = $doc.createattribute("version")
+ $attrversion.value = "${{parameters.nugetPackageVersion }}"
+ $packagerefnode.attributes.append($attrinclude)
+ $packagerefnode.attributes.append($attrversion)
+ $parentNode.AppendChild($packageRefNode)
+ }
+
+ $currentFolder = Get-Location
+ $filePath = Join-Path $currentFolder "Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider.csproj"
+ $Doc.Save($filePath)
+ workingDirectory: 'src/Microsoft.Data.SqlClient/add-ons/AzureKeyVaultProvider'
+ displayName: 'Update AKV Project Ref to Package Ref (.NET Framework/Core)'
diff --git a/eng/pipelines/dotnet-sqlclient-signing-pipeline.yml b/eng/pipelines/dotnet-sqlclient-signing-pipeline.yml
new file mode 100644
index 0000000000..aa8d90d3e5
--- /dev/null
+++ b/eng/pipelines/dotnet-sqlclient-signing-pipeline.yml
@@ -0,0 +1,162 @@
+#################################################################################
+# 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. #
+#################################################################################
+
+name: $(Year:YY)$(DayOfYear)$(Rev:.rr)
+trigger:
+ branches:
+ include:
+ - internal/main
+ paths:
+ include:
+ - src
+ - eng
+ - tools
+ - .config
+ - build.proj
+ - Nuget.config
+ - '*.cmd'
+ - '*.sh'
+
+schedules:
+- cron: '30 4 * * Mon'
+ displayName: Weekly Sunday 9:30 PM (UTC - 7) Build
+ branches:
+ include:
+ - internal/main
+ always: true
+
+- cron: '30 3 * * Mon-Fri'
+ displayName: Mon-Fri 8:30 PM (UTC - 7) Build
+ branches:
+ include:
+ - internal/main
+
+parameters: # parameters are shown up in ADO UI in a build queue time
+- name: 'debug'
+ displayName: 'Enable debug output'
+ type: boolean
+ default: true
+
+- name: publishSymbols
+ displayName: 'Publish symbols'
+ type: boolean
+ default: false
+- name: MDS_PackageRef_Version
+ displayName: 'MDS package version of AKV Provider (build AKV)'
+ type: string
+ default: 5.1.5
+- name: CurrentNetFxVersion
+ displayName: 'Lowest supported .NET Framework version (MDS validation)'
+ type: string
+ default: 'net462'
+- name: oneBranchType
+ displayName: 'Select OneBranch template'
+ default: Official
+ values:
+ - NonOfficial
+ - Official
+
+variables:
+ - template: /eng/pipelines/libraries/variables.yml@self
+ - name: packageFolderName
+ value: drop_buildMDS_build_signed_package
+ - name: PublishSymbols
+ value: ${{ parameters['publishSymbols'] }}
+ - name: MDS_PackageRef_Version
+ value: ${{ parameters['MDS_PackageRef_Version'] }}
+ - name: CurrentNetFxVersion
+ value: ${{ parameters['CurrentNetFxVersion'] }}
+ - name: ProductVersion #MDS product version (MDS validation)
+ value: $(NUGETPACKAGEVERSION)
+
+resources:
+ repositories:
+ - repository: templates
+ type: git
+ name: OneBranch.Pipelines/GovernedTemplates
+ ref: refs/heads/main
+
+extends:
+ template: v2/OneBranch.${{parameters.oneBranchType }}.CrossPlat.yml@templates # https://aka.ms/obpipelines/templates
+ parameters:
+ featureFlags:
+ WindowsHostVersion: 1ESWindows2022
+ globalSdl: # https://aka.ms/obpipelines/sdl
+ apiscan:
+ enabled: true
+ softwareFolder: $(softwareFolder)
+ symbolsFolder: $(symbolsFolder)
+ softwarename: Microsoft.Data.SqlClient
+ versionNumber: $(AssemblyFileVersion)
+ tsa:
+ enabled: true # onebranch publish all sdl results to TSA. If TSA is disabled all SDL tools will forced into 'break' build mode.
+ codeql:
+ compiled:
+ enabled: true
+ sbom:
+ enabled: true
+ packageName: Microsoft.Data.SqlClient
+ packageVersion: $(NugetPackageVersion)
+ asyncSdl:
+ enabled: false
+ credscan:
+ enabled: true
+ suppressionsFile: $(REPOROOT)/.config/CredScanSuppressions.json
+ binskim:
+ enabled: true
+ policheck:
+ enabled: true
+ break: true # always break the build on policheck issues. You can disable it by setting to 'false'
+ exclusionsFile: $(REPOROOT)\.config\PolicheckExclusions.xml
+ armory:
+ enabled: true
+ break: true
+ eslint: # TypeScript and JavaScript
+ enabled: false
+ roslyn:
+ enabled: true
+ break: true
+ publishLogs:
+ enabled: true
+ tsaOptionsPath: $(REPOROOT)\.config\tsaoptions.json
+ disableLegacyManifest: true
+ stages:
+ - stage: buildAKV
+ jobs:
+ - template: eng/pipelines/common/templates/jobs/build-signed-akv-package-job.yml@self
+ parameters:
+ symbolsFolder: $(symbolsFolder)
+ softwareFolder: $(softwareFolder)
+ publishSymbols: ${{ parameters['publishSymbols'] }}
+
+ - stage: buildMDS
+ jobs:
+ - template: eng/pipelines/common/templates/jobs/build-signed-package-job.yml@self
+ parameters:
+ symbolsFolder: $(symbolsFolder)
+ softwareFolder: $(softwareFolder)
+ publishSymbols: ${{ parameters['publishSymbols'] }}
+
+ - stage: package_validation
+ dependsOn: buildMDS
+ jobs:
+ - template: eng/pipelines/common/templates/jobs/validate-signed-package-job.yml@self
+ parameters:
+ packageFolderName: $(packageFolderName)
+ downloadPackageStep:
+ download: current
+ artifact: $(packageFolderName)
+ patterns: '**/*.*nupkg'
+ displayName: 'Download NuGet Package'
+
+ - template: eng/pipelines/common/templates/jobs/run-tests-package-reference-job.yml@self
+ parameters:
+ packageFolderName: $(packageFolderName)
+ downloadPackageStep:
+ download: current
+ artifact: $(packageFolderName)
+ patterns: '**/*.nupkg'
+ displayName: 'Download NuGet Package'
diff --git a/eng/pipelines/libraries/akv-variables.yml b/eng/pipelines/libraries/akv-variables.yml
new file mode 100644
index 0000000000..259ae19dba
--- /dev/null
+++ b/eng/pipelines/libraries/akv-variables.yml
@@ -0,0 +1,15 @@
+#################################################################################
+# 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. #
+#################################################################################
+
+variables:
+ - group: AKV Release Variables
+
+ - name: AKVNugetPackageVersion
+ value: $(AKVMajor).$(AKVMinor).$(AKVPatch)
+ - name: AKVAssemblyFileVersion
+ value: '$(AKVMajor).$(AKVMinor)$(AKVPatch).$(Build.BuildNumber)'
+ - name: akvNuspecPath
+ value: tools/specs/add-ons/Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider.nuspec
diff --git a/eng/pipelines/libraries/build-variables.yml b/eng/pipelines/libraries/build-variables.yml
new file mode 100644
index 0000000000..1c26f26a69
--- /dev/null
+++ b/eng/pipelines/libraries/build-variables.yml
@@ -0,0 +1,10 @@
+#################################################################################
+# 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. #
+#################################################################################
+
+variables:
+ - template: common-variables.yml@self
+ - template: akv-variables.yml@self
+ - template: mds-variables.yml@self
diff --git a/eng/pipelines/libraries/common-variables.yml b/eng/pipelines/libraries/common-variables.yml
new file mode 100644
index 0000000000..fb85f70d36
--- /dev/null
+++ b/eng/pipelines/libraries/common-variables.yml
@@ -0,0 +1,19 @@
+#################################################################################
+# 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. #
+#################################################################################
+
+variables:
+ - name: Configuration
+ value: Release
+ - name: CommitHead
+ value: '' # the value will be extracted from the repo's head
+ - name: REPOROOT
+ value: $(Build.SourcesDirectory)
+ - name: softwareFolder
+ value: $(REPOROOT)/software
+ - name: symbolsFolder
+ value: $(REPOROOT)/symbols
+ - name: artifactDirectory
+ value: '$(REPOROOT)/packages'
diff --git a/eng/pipelines/libraries/mds-validation-variables.yml b/eng/pipelines/libraries/mds-validation-variables.yml
new file mode 100644
index 0000000000..7aed06dd61
--- /dev/null
+++ b/eng/pipelines/libraries/mds-validation-variables.yml
@@ -0,0 +1,34 @@
+#################################################################################
+# 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. #
+#################################################################################
+
+variables:
+ - template: common-variables.yml@self
+ - template: mds-variables.yml@self
+
+ - name: TempFolderName # extract the nuget package here
+ value: temp
+ - name: extractedNugetPath
+ value: $(Build.SourcesDirectory)\$(TempFolderName)\Microsoft.Data.SqlClient.$(NugetPackageVersion)
+ - name: expectedFolderNames
+ value: lib,ref,runtimes
+ - name: expectedDotnetVersions
+ value: net462,net6.0,net8.0
+ - name: Database
+ value: Northwind
+ - name: platform
+ value: AnyCPU
+ - name: TargetNetFxVersion
+ value: net481
+ - name: TargetNetCoreVersion
+ value: net8.0
+ - name: SQLTarget
+ value: localhost
+ - name: encrypt
+ value: false
+ - name: SQL_NP_CONN_STRING
+ value: Data Source=np:$(SQLTarget);Initial Catalog=$(Database);Integrated Security=true;Encrypt=$(ENCRYPT);TrustServerCertificate=true;
+ - name: SQL_TCP_CONN_STRING
+ value: Data Source=tcp:$(SQLTarget);Initial Catalog=$(Database);Integrated Security=true;Encrypt=$(ENCRYPT);TrustServerCertificate=true;
diff --git a/eng/pipelines/libraries/mds-variables.yml b/eng/pipelines/libraries/mds-variables.yml
new file mode 100644
index 0000000000..3da3172fa3
--- /dev/null
+++ b/eng/pipelines/libraries/mds-variables.yml
@@ -0,0 +1,15 @@
+#################################################################################
+# 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. #
+#################################################################################
+
+variables:
+ - group: Release Variables
+
+ - name: NugetPackageVersion
+ value: $(Major).$(Minor).$(Patch)
+ - name: AssemblyFileVersion
+ value: '$(Major).$(Minor)$(Patch).$(Build.BuildNumber)'
+ - name: nuspecPath
+ value: '$(REPOROOT)/tools/specs/Microsoft.Data.SqlClient.nuspec'
diff --git a/eng/pipelines/libraries/variables.yml b/eng/pipelines/libraries/variables.yml
new file mode 100644
index 0000000000..57894459d3
--- /dev/null
+++ b/eng/pipelines/libraries/variables.yml
@@ -0,0 +1,17 @@
+#################################################################################
+# 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. #
+#################################################################################
+
+variables:
+ - template: build-variables.yml@self
+ # onebranch template variables
+ - name: ob_outputDirectory
+ value: '$(artifactDirectory)' # this directory is uploaded to pipeline artifacts, reddog and cloudvault. More info at https://aka.ms/obpipelines/artifacts
+ - name: ob_sdl_binskim_break
+ value: true # https://aka.ms/obpipelines/sdl
+ - name: Packaging.EnableSBOMSigning
+ value: true
+ - name: WindowsContainerImage
+ value: 'onebranch.azurecr.io/windows/ltsc2022/vse2022:latest' # Docker image which is used to build the project https://aka.ms/obpipelines/containers
diff --git a/release-notes/5.1/5.1.0.md b/release-notes/5.1/5.1.0.md
index e7c4eae495..adbf449e63 100644
--- a/release-notes/5.1/5.1.0.md
+++ b/release-notes/5.1/5.1.0.md
@@ -79,7 +79,7 @@ The default value of the `ServerCertificate` connection setting is an empty stri
#### .NET
-- Microsoft.Data.SqlClient.SNI 5.1.0
+- Microsoft.Data.SqlClient.SNI.runtime 5.1.0
- Azure.Identity 1.7.0
- Microsoft.Identity.Client 4.47.2
- Microsoft.IdentityModel.JsonWebTokens 6.24.0
@@ -95,7 +95,7 @@ The default value of the `ServerCertificate` connection setting is an empty stri
#### .NET Standard
-- Microsoft.Data.SqlClient.SNI 5.1.0
+- Microsoft.Data.SqlClient.SNI.runtime 5.1.0
- Azure.Identity 1.7.0
- Microsoft.Identity.Client 4.47.2
- Microsoft.IdentityModel.Protocols.OpenIdConnect 6.24.0
diff --git a/release-notes/5.1/5.1.1.md b/release-notes/5.1/5.1.1.md
index bf40701739..057466a565 100644
--- a/release-notes/5.1/5.1.1.md
+++ b/release-notes/5.1/5.1.1.md
@@ -37,7 +37,7 @@ Thanks to the following public contributors. Their efforts toward this project a
#### .NET
-- Microsoft.Data.SqlClient.SNI 5.1.0
+- Microsoft.Data.SqlClient.SNI.runtime 5.1.0
- Azure.Identity 1.7.0
- Microsoft.Identity.Client 4.47.2
- Microsoft.IdentityModel.JsonWebTokens 6.24.0
@@ -53,7 +53,7 @@ Thanks to the following public contributors. Their efforts toward this project a
#### .NET Standard
-- Microsoft.Data.SqlClient.SNI 5.1.0
+- Microsoft.Data.SqlClient.SNI.runtime 5.1.0
- Azure.Identity 1.7.0
- Microsoft.Identity.Client 4.47.2
- Microsoft.IdentityModel.Protocols.OpenIdConnect 6.24.0
diff --git a/release-notes/5.1/5.1.2.md b/release-notes/5.1/5.1.2.md
index 14c4b347ad..cb9ccc5992 100644
--- a/release-notes/5.1/5.1.2.md
+++ b/release-notes/5.1/5.1.2.md
@@ -45,7 +45,7 @@ Thanks to the following public contributors. Their efforts toward this project a
#### .NET
-- Microsoft.Data.SqlClient.SNI 5.1.1
+- Microsoft.Data.SqlClient.SNI.runtime 5.1.1
- Azure.Identity 1.7.0
- Microsoft.Identity.Client 4.47.2
- Microsoft.IdentityModel.JsonWebTokens 6.24.0
@@ -61,7 +61,7 @@ Thanks to the following public contributors. Their efforts toward this project a
#### .NET Standard
-- Microsoft.Data.SqlClient.SNI 5.1.1
+- Microsoft.Data.SqlClient.SNI.runtime 5.1.1
- Azure.Identity 1.7.0
- Microsoft.Identity.Client 4.47.2
- Microsoft.IdentityModel.Protocols.OpenIdConnect 6.24.0
diff --git a/release-notes/5.1/5.1.3.md b/release-notes/5.1/5.1.3.md
index 75a3140a6d..7889bf61bb 100644
--- a/release-notes/5.1/5.1.3.md
+++ b/release-notes/5.1/5.1.3.md
@@ -34,7 +34,7 @@ Thanks to the following public contributors. Their efforts toward this project a
#### .NET
-- Microsoft.Data.SqlClient.SNI 5.1.1
+- Microsoft.Data.SqlClient.SNI.runtime 5.1.1
- Azure.Identity 1.7.0
- Microsoft.Identity.Client 4.47.2
- Microsoft.IdentityModel.JsonWebTokens 6.24.0
@@ -50,7 +50,7 @@ Thanks to the following public contributors. Their efforts toward this project a
#### .NET Standard
-- Microsoft.Data.SqlClient.SNI 5.1.1
+- Microsoft.Data.SqlClient.SNI.runtime 5.1.1
- Azure.Identity 1.7.0
- Microsoft.Identity.Client 4.47.2
- Microsoft.IdentityModel.Protocols.OpenIdConnect 6.24.0
diff --git a/release-notes/5.1/5.1.4.md b/release-notes/5.1/5.1.4.md
index 3f4e784b75..c1638b1eee 100644
--- a/release-notes/5.1/5.1.4.md
+++ b/release-notes/5.1/5.1.4.md
@@ -37,7 +37,7 @@ Thanks to the following public contributors. Their efforts toward this project a
#### .NET
-- Microsoft.Data.SqlClient.SNI 5.1.1
+- Microsoft.Data.SqlClient.SNI.runtime 5.1.1
- Azure.Identity 1.10.3
- Microsoft.Identity.Client 4.56.2
- Microsoft.IdentityModel.JsonWebTokens 6.24.0
@@ -53,7 +53,7 @@ Thanks to the following public contributors. Their efforts toward this project a
#### .NET Standard
-- Microsoft.Data.SqlClient.SNI 5.1.1
+- Microsoft.Data.SqlClient.SNI.runtime 5.1.1
- Azure.Identity 1.10.3
- Microsoft.Identity.Client 4.56.2
- Microsoft.IdentityModel.Protocols.OpenIdConnect 6.24.0
diff --git a/release-notes/5.1/5.1.5.md b/release-notes/5.1/5.1.5.md
index c25672a8d1..e05c26861f 100644
--- a/release-notes/5.1/5.1.5.md
+++ b/release-notes/5.1/5.1.5.md
@@ -39,7 +39,7 @@ Thanks to the following public contributors. Their efforts toward this project a
#### .NET
-- Microsoft.Data.SqlClient.SNI 5.1.1
+- Microsoft.Data.SqlClient.SNI.runtime 5.1.1
- Azure.Identity 1.10.3
- Microsoft.Identity.Client 4.56.2
- Microsoft.IdentityModel.JsonWebTokens 6.35.0
@@ -55,7 +55,7 @@ Thanks to the following public contributors. Their efforts toward this project a
#### .NET Standard
-- Microsoft.Data.SqlClient.SNI 5.1.1
+- Microsoft.Data.SqlClient.SNI.runtime 5.1.1
- Azure.Identity 1.10.3
- Microsoft.Identity.Client 4.56.2
- Microsoft.IdentityModel.Protocols.OpenIdConnect 6.35.0
diff --git a/release-notes/5.2/5.2.0-preview1.md b/release-notes/5.2/5.2.0-preview1.md
index 84a4678452..152b3169b8 100644
--- a/release-notes/5.2/5.2.0-preview1.md
+++ b/release-notes/5.2/5.2.0-preview1.md
@@ -63,7 +63,7 @@ Thanks to the following public contributors. Their efforts toward this project a
#### .NET
-- Microsoft.Data.SqlClient.SNI 5.1.0
+- Microsoft.Data.SqlClient.SNI.runtime 5.1.0
- Azure.Identity 1.8.0
- Microsoft.Identity.Client 4.47.2
- Microsoft.IdentityModel.JsonWebTokens 6.24.0
@@ -82,7 +82,7 @@ Thanks to the following public contributors. Their efforts toward this project a
#### .NET Standard
-- Microsoft.Data.SqlClient.SNI 5.1.0
+- Microsoft.Data.SqlClient.SNI.runtime 5.1.0
- Azure.Identity 1.6.0
- Microsoft.Identity.Client 4.47.2
- Microsoft.IdentityModel.Protocols.OpenIdConnect 6.24.0
diff --git a/release-notes/5.2/5.2.0-preview2.md b/release-notes/5.2/5.2.0-preview2.md
index 6cfd799f69..360894b93a 100644
--- a/release-notes/5.2/5.2.0-preview2.md
+++ b/release-notes/5.2/5.2.0-preview2.md
@@ -84,7 +84,7 @@ Example usage:
#### .NET
-- Microsoft.Data.SqlClient.SNI 5.1.0
+- Microsoft.Data.SqlClient.SNI.runtime 5.1.0
- Azure.Identity 1.8.0
- Microsoft.Identity.Client 4.53.0
- Microsoft.IdentityModel.JsonWebTokens 6.24.0
@@ -103,7 +103,7 @@ Example usage:
#### .NET Standard
-- Microsoft.Data.SqlClient.SNI 5.1.0
+- Microsoft.Data.SqlClient.SNI.runtime 5.1.0
- Azure.Identity 1.6.0
- Microsoft.Identity.Client 4.53.0
- Microsoft.IdentityModel.Protocols.OpenIdConnect 6.24.0
diff --git a/release-notes/5.2/5.2.0-preview3.md b/release-notes/5.2/5.2.0-preview3.md
index 0aa43912d2..82173a5744 100644
--- a/release-notes/5.2/5.2.0-preview3.md
+++ b/release-notes/5.2/5.2.0-preview3.md
@@ -81,7 +81,7 @@ Example usage:
#### .NET
-- Microsoft.Data.SqlClient.SNI 5.1.0
+- Microsoft.Data.SqlClient.SNI.runtime 5.1.0
- Azure.Identity 1.8.0
- Microsoft.Identity.Client 4.53.0
- Microsoft.IdentityModel.JsonWebTokens 6.24.0
@@ -100,7 +100,7 @@ Example usage:
#### .NET Standard
-- Microsoft.Data.SqlClient.SNI 5.1.0
+- Microsoft.Data.SqlClient.SNI.runtime 5.1.0
- Azure.Identity 1.6.0
- Microsoft.Identity.Client 4.53.0
- Microsoft.IdentityModel.Protocols.OpenIdConnect 6.24.0
diff --git a/release-notes/5.2/5.2.0.md b/release-notes/5.2/5.2.0.md
index 498db81ac6..aef0863b6c 100644
--- a/release-notes/5.2/5.2.0.md
+++ b/release-notes/5.2/5.2.0.md
@@ -1,7 +1,277 @@
-| 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) |
-| 2023/04/20 | 5.2.0-preview1.23109.1 | [release notes](5.2.0-preview1.md) |
+# Release Notes
+
+## Microsoft.Data.SqlClient 5.2.0 released 28 February 2024
+
+This update includes the following changes over the previous release:
+
+### Contributors
+Thanks to the following public contributors. Their efforts toward this project are very much appreciated.
+
+- [Wraith2](https://github.com/Wraith2)
+- [ErikEJ](https://github.com/ErikEJ)
+- [kant2002](https://github.com/kant2002)
+- [mattjohnsonpint](https://github.com/mattjohnsonpint)
+- [azerios](https://github.com/azerios)
+- [jinek](https://github.com/jinek)
+- [christothes](https://github.com/christothes)
+- [panoskj](https://github.com/panoskj)
+- [saitama951](https://github.com/saitama951)
+- [danielmarbach](https://github.com/danielmarbach)
+- [wsugarman](https://github.com/wsugarman)
+- [ViktorHofer](https://github.com/ViktorHofer)
+- [emidah](https://github.com/emidah)
+
+### Added
+
+- Added a new `AccessTokenCallback` API to `SqlConnection`. [#1260](https://github.com/dotnet/SqlClient/pull/1260) [Read more](#added-new-property-accesstokencallback-to-sqlconnection)
+- Added `SqlBatch` support on .NET 6+ [#1825](https://github.com/dotnet/SqlClient/pull/1825), [#2223](https://github.com/dotnet/SqlClient/pull/2223), [#2371](https://github.com/dotnet/SqlClient/pull/2371), [#2373](https://github.com/dotnet/SqlClient/pull/2373) [Read more](#added-new-property-sqlbatch-api)
+- Added support of `SqlDiagnosticListener` on **.NET Standard**. [#1931](https://github.com/dotnet/SqlClient/pull/1931)
+- Added new property `RowsCopied64` to `SqlBulkCopy`. [#2004](https://github.com/dotnet/SqlClient/pull/2004) [Read more](#added-new-property-rowscopied64-to-sqlbulkcopy)
+- Added support for the `SuperSocketNetLib` registry option for Encrypt on .NET on Windows. [#2047](https://github.com/dotnet/SqlClient/pull/2047)
+- Added the ability to generate debugging symbols in a separate package file [#2137](https://github.com/dotnet/SqlClient/pull/2137)
+- Added Workload Identity authentication support [#2159](https://github.com/dotnet/SqlClient/pull/2159), [#2264](https://github.com/dotnet/SqlClient/pull/2264)
+- Added support for Big Endian systems [#2170](https://github.com/dotnet/SqlClient/pull/2170)
+- Added support for Georgian collation [#2194](https://github.com/dotnet/SqlClient/pull/2194)
+- Added Localization support on .NET [#2210](https://github.com/dotnet/SqlClient/pull/2110)
+- 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)
+
+### Changed
+
+- Improved parsing buffered characters in `TdsParser`. [#1544](https://github.com/dotnet/SqlClient/pull/1544)
+- Added Microsoft.SqlServer.Types to verify support for SqlHierarchyId and Spatial for .NET Core. [#1848](https://github.com/dotnet/SqlClient/pull/1848)
+- Moved to new System.Data.SqlTypes APIs in **.NET 7** and upper. [#1934](https://github.com/dotnet/SqlClient/pull/1934) and [#1981](https://github.com/dotnet/SqlClient/pull/1981)
+- Removed reference to Microsoft.Win32.Registry since it's shipped starting with .NET 6.0. [#1974](https://github.com/dotnet/SqlClient/pull/1974)
+- Changed **[UseOneSecFloorInTimeoutCalculationDuringLogin](https://learn.microsoft.com/sql/connect/ado-net/appcontext-switches#enable-a-minimum-timeout-during-login)** App Context switch default to **true** and extended its effect to .NET and .NET Standard. [#2012](https://github.com/dotnet/SqlClient/pull/2012)
+- Updated `Microsoft.Identity.Client` version from 4.47.2 to 4.53.0. [#2031](https://github.com/dotnet/SqlClient/pull/2031), [#2055](https://github.com/dotnet/SqlClient/pull/2055)
+- Switched to the new .NET [NegotiateAuthentication](https://learn.microsoft.com/en-us/dotnet/api/system.net.security.negotiateauthentication?view=net-7.0) API on .NET 7.0 and above for SSPI token negotiation using Managed SNI. [#2063](https://github.com/dotnet/SqlClient/pull/2063)
+- Removed `ignoreSniOpenTimeout` in open connection process on Windows. [#2067](https://github.com/dotnet/SqlClient/pull/2067)
+- Enforce explicit ordinal for internal `StringComparison` operations. [#2068](https://github.com/dotnet/SqlClient/pull/2068)
+- Improved error messages when validating server certificates in managed SNI (Linux/macOS) [#2060](https://github.com/dotnet/SqlClient/pull/2060)
+- Improved CPU usage when `AppContext` switches are in use [#2227](https://github.com/dotnet/SqlClient/pull/2227)
+- Upgraded `Azure.Identity` dependency version to [1.10.3](https://www.nuget.org/packages/Azure.Identity/1.10.3) to address [CVE-2023-36414](https://github.com/advisories/GHSA-5mfx-4wcx-rv27), [#2189](https://github.com/dotnet/SqlClient/pull/2189)
+- 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)
+- Updated `Microsoft.Data.SqlClient.SNI` (.NET Framework dependency) and `Microsoft.Data.SqlClient.SNI.runtime` (.NET/.NET Standard dependency) version to `v5.2.0`. [#2363](https://github.com/dotnet/SqlClient/pull/2363), which includes removing dead code and addressing static analysis warnings
+- Code health improvements: [#1198](https://github.com/dotnet/SqlClient/pull/1198), [#1829](https://github.com/dotnet/SqlClient/pull/1829), [#1943](https://github.com/dotnet/SqlClient/pull/1943), [#1949](https://github.com/dotnet/SqlClient/pull/1949), [#1959](https://github.com/dotnet/SqlClient/pull/1959), [#1985](https://github.com/dotnet/SqlClient/pull/1985), [#2071](https://github.com/dotnet/SqlClient/pull/2071), [#2073](https://github.com/dotnet/SqlClient/pull/2073), [#2088](https://github.com/dotnet/SqlClient/pull/2088), [#2091](https://github.com/dotnet/SqlClient/pull/2091), [#2098](https://github.com/dotnet/SqlClient/pull/2098), [#2121](https://github.com/dotnet/SqlClient/pull/2121), [#2122](https://github.com/dotnet/SqlClient/pull/2122), [#2132](https://github.com/dotnet/SqlClient/pull/2132), [#2136](https://github.com/dotnet/SqlClient/pull/2136), [#2144](https://github.com/dotnet/SqlClient/pull/2144), [#2147](https://github.com/dotnet/SqlClient/pull/2147), [#2157](https://github.com/dotnet/SqlClient/pull/2157), [#2164](https://github.com/dotnet/SqlClient/pull/2164), [#2166](https://github.com/dotnet/SqlClient/pull/2166), [#2168](https://github.com/dotnet/SqlClient/pull/2168), [#2186](https://github.com/dotnet/SqlClient/pull/2186), [#2254](https://github.com/dotnet/SqlClient/pull/2254), [#2288](https://github.com/dotnet/SqlClient/pull/2288), [#2305](https://github.com/dotnet/SqlClient/pull/2305), [#2317](https://github.com/dotnet/SqlClient/pull/2317)
+
+### Fixed
+
+- Fixed Always Encrypted secure enclave retry logic for async queries. [#1988](https://github.com/dotnet/SqlClient/pull/1988)
+- Fixed activity correlator to continue use of same GUID for connection activity. [#1997](https://github.com/dotnet/SqlClient/pull/1997)
+- Fixed behavior when error class is greater than 20 on connection retry. [#1953](https://github.com/dotnet/SqlClient/pull/1953)
+- Fixed error message when symmetric key decryption failed using Always Encrypted. [#1948](https://github.com/dotnet/SqlClient/pull/1948)
+- Fixed TransactionScope connection issue when Enlist is enable, Pooling is disabled and network connection type is Redirect. [#1960](https://github.com/dotnet/SqlClient/pull/1960)
+- Fixed TDS RPC error on large queries in SqlCommand.ExecuteReaderAsync. [#1936](https://github.com/dotnet/SqlClient/pull/1936)
+- Fixed throttling of token requests by calling AcquireTokenSilent. [#1925](https://github.com/dotnet/SqlClient/pull/1925)
+- Fixed Linux code coverage result in Build proj. [#1950](https://github.com/dotnet/SqlClient/pull/1950)
+- Fixed NullReferenceException in GetBytesAsync. [#1906](https://github.com/dotnet/SqlClient/pull/1906)
+- Fixed Transient fault handling issue with OpenAsync. [#1983](https://github.com/dotnet/SqlClient/pull/1983)
+- Fixed invariant mode checks. [#1917](https://github.com/dotnet/SqlClient/pull/1917)
+- Fixed GC behavior in TdsParser by adding array rental capability in TryReadPlpUnicodeChars. [#1866](https://github.com/dotnet/SqlClient/pull/1866)
+- Fixed socket synchronization issue during connect in managed SNI. [#1029](https://github.com/dotnet/SqlClient/pull/1029)
+- Fixed issue with `SqlConnectionStringBuilder` property indexer not supporting non-string values. [#2018](https://github.com/dotnet/SqlClient/pull/2018)
+- Fixed `SqlDataAdapter.Fill` and configurable retry logic issue on .NET Framework. [#2084](https://github.com/dotnet/SqlClient/pull/2084)
+- Fixed `SqlConnectionEncryptOption` type conversion by introducing the `SqlConnectionEncryptOptionConverter` attribute when using **appsettings.json** files. [#2057](https://github.com/dotnet/SqlClient/pull/2057)
+- Fixed th-TH culture info issue on Managed SNI. [#2066](https://github.com/dotnet/SqlClient/pull/2066)
+- Fixed an issue when using the Authentication option, but not encrypting on .NET Framework where the server certificate was being incorrectly validated [#2224](https://github.com/dotnet/SqlClient/pull/2224)
+- Fixed a deadlock problem for distributed transactions when on .NET [#2161](https://github.com/dotnet/SqlClient/pull/2161)
+- Fixed an issue with connecting to named instances on named pipes in managed SNI (Linux/macOS) [#2142](https://github.com/dotnet/SqlClient/pull/2142)
+- Fixed LocalDb connection issue with an invalid source when using managed SNI [#2129](https://github.com/dotnet/SqlClient/pull/2129)
+- Fixed an `AccessViolationException` when using a SQL Express user instance [#2101](https://github.com/dotnet/SqlClient/pull/2101)
+- Fixed a metadata query issue when connecting to Azure SQL Edge [#2099](https://github.com/dotnet/SqlClient/pull/2099)
+- Fixed file version information for .NET and .NET Standard binaries [#2093](https://github.com/dotnet/SqlClient/pull/2093)
+- Fixed the SPN sent for a named instance when using Kerberos authentication on Linux/macOS [#2240](https://github.com/dotnet/SqlClient/pull/2240)
+- 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)
+
+## New features
+
+### Added new property `SQLBatch API`
+
+```csharp
+using Microsoft.Data.SqlClient;
+
+class Program
+{
+ static void Main()
+ {
+ string str = "Data Source=(local);Initial Catalog=Northwind;"
+ + "Integrated Security=SSPI;Encrypt=False";
+ RunBatch(str);
+ }
+
+ static void RunBatch(string connString)
+ {
+ using var connection = new SqlConnection(connString);
+ connection.Open();
+
+ var batch = new SqlBatch(connection);
+
+ const int count = 10;
+ const string parameterName = "parameter";
+ for (int i = 0; i < count; i++)
+ {
+ var batchCommand = new SqlBatchCommand($"SELECT @{parameterName} as value");
+ batchCommand.Parameters.Add(new SqlParameter(parameterName, i));
+ batch.BatchCommands.Add(batchCommand);
+ }
+
+ // Optionally Prepare
+ batch.Prepare();
+
+ var results = new List(count);
+ using (SqlDataReader reader = batch.ExecuteReader())
+ {
+ do
+ {
+ while (reader.Read())
+ {
+ results.Add(reader.GetFieldValue(0));
+ }
+ } while (reader.NextResult());
+ }
+ Console.WriteLine(string.Join(", ", results));
+ }
+}
+```
+
+### Added new property `RowsCopied64` to SqlBulkCopy
+
+SqlBulkCopy has a new property `RowsCopied64` which supports `long` value types.
+
+**Note that the existing `SqlBulkCopy.RowsCopied` behavior is unchanged. When the value exceeds `int.MaxValue`, `RowsCopied` can return a negative number.**
+
+Example usage:
+
+```C#
+ using (SqlConnection srcConn = new SqlConnection(srcConstr))
+ using (SqlCommand srcCmd = new SqlCommand("select top 5 * from employees", srcConn))
+ {
+ srcConn.Open();
+ using (DbDataReader reader = srcCmd.ExecuteReader())
+ {
+ using (SqlBulkCopy bulkcopy = new SqlBulkCopy(dstConn))
+ {
+ bulkcopy.DestinationTableName = dstTable;
+ SqlBulkCopyColumnMappingCollection ColumnMappings = bulkcopy.ColumnMappings;
+
+ ColumnMappings.Add("EmployeeID", "col1");
+ ColumnMappings.Add("LastName", "col2");
+ ColumnMappings.Add("FirstName", "col3");
+
+ bulkcopy.WriteToServer(reader);
+ long rowsCopied = bulkcopy.RowsCopied64;
+ }
+ }
+ }
+```
+
+### Added new property `AccessTokenCallback` to SqlConnection
+
+SqlConnection supports `TokenCredential` authentication by introducing a new `AccessTokenCallback` property as a `Func>` delegate to return a federated authentication access token.
+
+Example usage:
+
+```C#
+ using Microsoft.Data.SqlClient;
+ using Azure.Identity;
+
+ const string defaultScopeSuffix = "/.default";
+ string connectionString = GetConnectionString();
+ using SqlConnection connection = new SqlConnection(connectionString);
+
+ connection.AccessTokenCallback = async (authParams, cancellationToken) =>
+ {
+ var cred = new DefaultAzureCredential();
+ string scope = authParams.Resource.EndsWith(defaultScopeSuffix) ? authParams.Resource : authParams.Resource + defaultScopeSuffix;
+ AccessToken token = await cred.GetTokenAsync(new TokenRequestContext(new[] { scope }), cancellationToken);
+ return new SqlAuthenticationToken(token.Token, token.ExpiresOn);
+ }
+
+ connection.Open();
+ Console.WriteLine("ServerVersion: {0}", connection.ServerVersion);
+ Console.WriteLine("State: {0}", connection.State);
+```
+
+## 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
+- 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.runtime 5.2.0
+- 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.runtime 5.2.0
+- 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.runtime 5.2.0
+- 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.runtime 5.2.0
+- 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
+
diff --git a/release-notes/5.2/5.2.md b/release-notes/5.2/5.2.md
new file mode 100644
index 0000000000..8193904e37
--- /dev/null
+++ b/release-notes/5.2/5.2.md
@@ -0,0 +1,18 @@
+# Microsoft.Data.SqlClient 5.2 Releases
+
+The following Microsoft.Data.SqlClient 5.2 stable releases have been shipped:
+
+| Release Date | Version | Notes |
+| :-- | :-- | :--: |
+| 2024/02/28 | 5.2.0 | [release notes](5.2.0.md) |
+
+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) |
+| 2023/04/20 | 5.2.0-preview1.23109.1 | [release notes](5.2.0-preview1.md) |
+
diff --git a/release-notes/5.2/README.md b/release-notes/5.2/README.md
index 8d4c031aea..a311f99484 100644
--- a/release-notes/5.2/README.md
+++ b/release-notes/5.2/README.md
@@ -1,5 +1,11 @@
# Microsoft.Data.SqlClient 5.2 Releases
+The following Microsoft.Data.SqlClient 5.2 stable releases have been shipped:
+
+| Release Date | Version | Notes |
+| :-- | :-- | :--: |
+| 2024/02/28 | 5.2.0 | [release notes](5.2.0.md) |
+
The following Microsoft.Data.SqlClient 5.2 preview releases have been shipped:
| Release Date | Version | Notes |
diff --git a/release-notes/README.md b/release-notes/README.md
index 94f7459695..8a23b21e3b 100644
--- a/release-notes/README.md
+++ b/release-notes/README.md
@@ -1,6 +1,6 @@
# Microsoft.Data.SqlClient Release Notes
-The latest stable release is [Microsoft.Data.SqlClient 5.1](5.1).
+The latest stable release is [Microsoft.Data.SqlClient 5.2](5.2).
## Release Information
@@ -18,7 +18,7 @@ The latest stable release is [Microsoft.Data.SqlClient 5.1](5.1).
# Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider Release Notes
-The latest stable release is [Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider 3.0](add-ons/AzureKeyVaultProvider/3.0).
+The latest stable release is [Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider 5.1](add-ons/AzureKeyVaultProvider/5.1).
## Release Information
diff --git a/src/Directory.Build.props b/src/Directory.Build.props
index 27b5f364dd..1fa393eccb 100644
--- a/src/Directory.Build.props
+++ b/src/Directory.Build.props
@@ -15,10 +15,8 @@
"Project" => Build and run tests with Microsoft.Data.SqlClient as Project Reference
"Package" => Build and run tests with Microsoft.Data.SqlClient as Package Reference with configured "TestMicrosoftDataSqlClientVersion" in "Versions.props" file.
- "NetStandard" => Build and run tests with Microsoft.Data.SqlClient as Project Reference via .NET Standard Library
- "NetStandardPackage" => Build and run tests with Microsoft.Data.SqlClient as Package Reference via .NET Standard Library
- ************** IMPORTANT NOTE BEFORE PROCEEDING WITH "PACKAGE" AND "NETSTANDARDPACKAGE" REFERENCE TYPES ***************
+ ************** IMPORTANT NOTE BEFORE PROCEEDING WITH "PACKAGE" REFERENCE TYPE ***************
CREATE A NUGET PACKAGE WITH BELOW COMMAND AND ADD TO LOCAL FOLDER + UPDATE NUGET CONFIG FILE TO READ FROM THAT LOCATION
> msbuild -p:configuration=Release
-->
@@ -51,6 +49,7 @@
$(ManagedSourceCode)src\Resources\
$(ManagedSourceCode)add-ons\
$(RepoRoot)src\Microsoft.SqlServer.Server\
+ $(RepoRoot)src\Microsoft.Data.SqlClient\src\
$(Artifacts)obj\
$(NetCoreSource)src\Common\src
$(NetCoreSource)src\Common\tests
@@ -95,5 +94,10 @@
-
+
+
+
+
+ false
+
diff --git a/src/Microsoft.Data.SqlClient.sln b/src/Microsoft.Data.SqlClient.sln
index b09409f828..04668c8f81 100644
--- a/src/Microsoft.Data.SqlClient.sln
+++ b/src/Microsoft.Data.SqlClient.sln
@@ -78,6 +78,7 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Microsoft.Data.Sql", "Microsoft.Data.Sql", "{0CE216CE-8072-4985-B248-61F0D0BE9C2E}"
ProjectSection(SolutionItems) = preProject
..\doc\snippets\Microsoft.Data.Sql\SqlNotificationRequest.xml = ..\doc\snippets\Microsoft.Data.Sql\SqlNotificationRequest.xml
+ ..\doc\snippets\Microsoft.Data.Sql\SqlDataSourceEnumerator.xml = ..\doc\snippets\Microsoft.Data.Sql\SqlDataSourceEnumerator.xml
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Microsoft.Data.SqlClient", "Microsoft.Data.SqlClient", "{C05F4FFE-6A14-4409-AA0A-10630BE4F1EE}"
@@ -142,6 +143,16 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Microsoft.Data.SqlClient",
..\doc\snippets\Microsoft.Data.SqlClient\SqlRowUpdatingEventArgs.xml = ..\doc\snippets\Microsoft.Data.SqlClient\SqlRowUpdatingEventArgs.xml
..\doc\snippets\Microsoft.Data.SqlClient\SqlRowUpdatingEventHandler.xml = ..\doc\snippets\Microsoft.Data.SqlClient\SqlRowUpdatingEventHandler.xml
..\doc\snippets\Microsoft.Data.SqlClient\SqlTransaction.xml = ..\doc\snippets\Microsoft.Data.SqlClient\SqlTransaction.xml
+ ..\doc\snippets\Microsoft.Data.SqlClient\SqlBulkCopyColumnOrderHint.xml = ..\doc\snippets\Microsoft.Data.SqlClient\SqlBulkCopyColumnOrderHint.xml
+ ..\doc\snippets\Microsoft.Data.SqlClient\SqlBulkCopyColumnOrderHintCollection.xml = ..\doc\snippets\Microsoft.Data.SqlClient\SqlBulkCopyColumnOrderHintCollection.xml
+ ..\doc\snippets\Microsoft.Data.SqlClient\SqlConfigurableRetryFactory.xml = ..\doc\snippets\Microsoft.Data.SqlClient\SqlConfigurableRetryFactory.xml
+ ..\doc\snippets\Microsoft.Data.SqlClient\SqlConnectionIPAddressPreference.xml = ..\doc\snippets\Microsoft.Data.SqlClient\SqlConnectionIPAddressPreference.xml
+ ..\doc\snippets\Microsoft.Data.SqlClient\SqlConnectionOverrides.xml = ..\doc\snippets\Microsoft.Data.SqlClient\SqlConnectionOverrides.xml
+ ..\doc\snippets\Microsoft.Data.SqlClient\SqlRetryingEventArgs.xml = ..\doc\snippets\Microsoft.Data.SqlClient\SqlRetryingEventArgs.xml
+ ..\doc\snippets\Microsoft.Data.SqlClient\SqlRetryIntervalBaseEnumerator.xml = ..\doc\snippets\Microsoft.Data.SqlClient\SqlRetryIntervalBaseEnumerator.xml
+ ..\doc\snippets\Microsoft.Data.SqlClient\SqlRetryLogicBase.xml = ..\doc\snippets\Microsoft.Data.SqlClient\SqlRetryLogicBase.xml
+ ..\doc\snippets\Microsoft.Data.SqlClient\SqlRetryLogicBaseProvider.xml = ..\doc\snippets\Microsoft.Data.SqlClient\SqlRetryLogicBaseProvider.xml
+ ..\doc\snippets\Microsoft.Data.SqlClient\SqlRetryLogicOption.xml = ..\doc\snippets\Microsoft.Data.SqlClient\SqlRetryLogicOption.xml
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Microsoft.Data.SqlClient.DataClassification", "Microsoft.Data.SqlClient.DataClassification", "{5D1F0032-7B0D-4FB6-A969-FCFB25C9EA1D}"
@@ -151,22 +162,13 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Microsoft.Data.SqlClient.Da
..\doc\snippets\Microsoft.Data.SqlClient.DataClassification\Label.xml = ..\doc\snippets\Microsoft.Data.SqlClient.DataClassification\Label.xml
..\doc\snippets\Microsoft.Data.SqlClient.DataClassification\SensitivityClassification.xml = ..\doc\snippets\Microsoft.Data.SqlClient.DataClassification\SensitivityClassification.xml
..\doc\snippets\Microsoft.Data.SqlClient.DataClassification\SensitivityProperty.xml = ..\doc\snippets\Microsoft.Data.SqlClient.DataClassification\SensitivityProperty.xml
+ ..\doc\snippets\Microsoft.Data.SqlClient.DataClassification\SensitivityRank.xml = ..\doc\snippets\Microsoft.Data.SqlClient.DataClassification\SensitivityRank.xml
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Microsoft.Data.SqlClient.Server", "Microsoft.Data.SqlClient.Server", "{650EB7FA-EB0D-4F8E-AB2C-161C3AD8E363}"
ProjectSection(SolutionItems) = preProject
- ..\doc\snippets\Microsoft.Data.SqlClient.Server\DataAccessKind.xml = ..\doc\snippets\Microsoft.Data.SqlClient.Server\DataAccessKind.xml
- ..\doc\snippets\Microsoft.Data.SqlClient.Server\Format.xml = ..\doc\snippets\Microsoft.Data.SqlClient.Server\Format.xml
- ..\doc\snippets\Microsoft.Data.SqlClient.Server\IBinarySerialize.xml = ..\doc\snippets\Microsoft.Data.SqlClient.Server\IBinarySerialize.xml
- ..\doc\snippets\Microsoft.Data.SqlClient.Server\InvalidUdtException.xml = ..\doc\snippets\Microsoft.Data.SqlClient.Server\InvalidUdtException.xml
..\doc\snippets\Microsoft.Data.SqlClient.Server\SqlDataRecord.xml = ..\doc\snippets\Microsoft.Data.SqlClient.Server\SqlDataRecord.xml
- ..\doc\snippets\Microsoft.Data.SqlClient.Server\SqlFacetAttribute.xml = ..\doc\snippets\Microsoft.Data.SqlClient.Server\SqlFacetAttribute.xml
- ..\doc\snippets\Microsoft.Data.SqlClient.Server\SqlFunctionAttribute.xml = ..\doc\snippets\Microsoft.Data.SqlClient.Server\SqlFunctionAttribute.xml
..\doc\snippets\Microsoft.Data.SqlClient.Server\SqlMetaData.xml = ..\doc\snippets\Microsoft.Data.SqlClient.Server\SqlMetaData.xml
- ..\doc\snippets\Microsoft.Data.SqlClient.Server\SqlMethodAttribute.xml = ..\doc\snippets\Microsoft.Data.SqlClient.Server\SqlMethodAttribute.xml
- ..\doc\snippets\Microsoft.Data.SqlClient.Server\SqlUserDefinedAggregateAttribute.xml = ..\doc\snippets\Microsoft.Data.SqlClient.Server\SqlUserDefinedAggregateAttribute.xml
- ..\doc\snippets\Microsoft.Data.SqlClient.Server\SqlUserDefinedTypeAttribute.xml = ..\doc\snippets\Microsoft.Data.SqlClient.Server\SqlUserDefinedTypeAttribute.xml
- ..\doc\snippets\Microsoft.Data.SqlClient.Server\SystemDataAccessKind.xml = ..\doc\snippets\Microsoft.Data.SqlClient.Server\SystemDataAccessKind.xml
..\doc\snippets\Microsoft.Data.SqlClient.Server\TriggerAction.xml = ..\doc\snippets\Microsoft.Data.SqlClient.Server\TriggerAction.xml
EndProjectSection
EndProject
@@ -177,12 +179,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Microsoft.Data.SqlTypes", "
EndProject
Project("{E53339B2-1760-4266-BCC7-CA923CBCF16C}") = "docker-compose", "docker-compose.dcproj", "{F5DF2FDC-C860-4CB3-8B24-7C903C6FC076}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Data.SqlClient.NSLibrary", "Microsoft.Data.SqlClient\tests\NSLibrary\Microsoft.Data.SqlClient.NSLibrary.csproj", "{E7336BFB-8521-423A-A140-3123F9065C5D}"
- ProjectSection(ProjectDependencies) = postProject
- {37431336-5307-4184-9356-C4B7E47DC714} = {37431336-5307-4184-9356-C4B7E47DC714}
- {407890AC-9876-4FEF-A6F1-F36A876BAADE} = {407890AC-9876-4FEF-A6F1-F36A876BAADE}
- EndProjectSection
-EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Data.SqlClient.TestUtilities", "Microsoft.Data.SqlClient\tests\tools\Microsoft.Data.SqlClient.TestUtilities\Microsoft.Data.SqlClient.TestUtilities.csproj", "{89D6D382-9B36-43C9-A912-03802FDA8E36}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Data.SqlClient.ExtUtilities", "Microsoft.Data.SqlClient\tests\tools\Microsoft.Data.SqlClient.ExtUtilities\Microsoft.Data.SqlClient.ExtUtilities.csproj", "{E4C08DCE-DC29-4FEB-B655-1E7287DB5A2B}"
@@ -197,9 +193,29 @@ EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Data.SqlClient.PerformanceTests", "Microsoft.Data.SqlClient\tests\PerformanceTests\Microsoft.Data.SqlClient.PerformanceTests.csproj", "{599A336B-2A5F-473D-8442-1223ED37C93E}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{4F3CD363-B1E6-4D6D-9466-97D78A56BE45}"
+ ProjectSection(SolutionItems) = preProject
+ Directory.Build.props = Directory.Build.props
+ NuGet.config = NuGet.config
+ EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.SqlServer.Server", "Microsoft.SqlServer.Server\Microsoft.SqlServer.Server.csproj", "{A314812A-7820-4565-A2A8-ABBE391C11E4}"
EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Microsoft.SqlServer.Server", "Microsoft.SqlServer.Server", "{869A9BCC-D303-4365-9BF7-958CD6387916}"
+ ProjectSection(SolutionItems) = preProject
+ ..\doc\snippets\Microsoft.SqlServer.Server\DataAccessKind.xml = ..\doc\snippets\Microsoft.SqlServer.Server\DataAccessKind.xml
+ ..\doc\snippets\Microsoft.SqlServer.Server\Format.xml = ..\doc\snippets\Microsoft.SqlServer.Server\Format.xml
+ ..\doc\snippets\Microsoft.SqlServer.Server\IBinarySerialize.xml = ..\doc\snippets\Microsoft.SqlServer.Server\IBinarySerialize.xml
+ ..\doc\snippets\Microsoft.SqlServer.Server\InvalidUdtException.xml = ..\doc\snippets\Microsoft.SqlServer.Server\InvalidUdtException.xml
+ ..\doc\snippets\Microsoft.SqlServer.Server\SqlFacetAttribute.xml = ..\doc\snippets\Microsoft.SqlServer.Server\SqlFacetAttribute.xml
+ ..\doc\snippets\Microsoft.SqlServer.Server\SqlFunctionAttribute.xml = ..\doc\snippets\Microsoft.SqlServer.Server\SqlFunctionAttribute.xml
+ ..\doc\snippets\Microsoft.SqlServer.Server\SqlMethodAttribute.xml = ..\doc\snippets\Microsoft.SqlServer.Server\SqlMethodAttribute.xml
+ ..\doc\snippets\Microsoft.SqlServer.Server\SqlUserDefinedAggregateAttribute.xml = ..\doc\snippets\Microsoft.SqlServer.Server\SqlUserDefinedAggregateAttribute.xml
+ ..\doc\snippets\Microsoft.SqlServer.Server\SqlUserDefinedTypeAttribute.xml = ..\doc\snippets\Microsoft.SqlServer.Server\SqlUserDefinedTypeAttribute.xml
+ ..\doc\snippets\Microsoft.SqlServer.Server\SystemDataAccessKind.xml = ..\doc\snippets\Microsoft.SqlServer.Server\SystemDataAccessKind.xml
+ EndProjectSection
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "TestClr", "TestClr", "{CDE508A5-F5D0-4A59-A4EF-978833830727}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -388,18 +404,6 @@ Global
{F5DF2FDC-C860-4CB3-8B24-7C903C6FC076}.Release|x64.Build.0 = Release|Any CPU
{F5DF2FDC-C860-4CB3-8B24-7C903C6FC076}.Release|x86.ActiveCfg = Release|Any CPU
{F5DF2FDC-C860-4CB3-8B24-7C903C6FC076}.Release|x86.Build.0 = Release|Any CPU
- {E7336BFB-8521-423A-A140-3123F9065C5D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {E7336BFB-8521-423A-A140-3123F9065C5D}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {E7336BFB-8521-423A-A140-3123F9065C5D}.Debug|x64.ActiveCfg = Debug|x64
- {E7336BFB-8521-423A-A140-3123F9065C5D}.Debug|x64.Build.0 = Debug|x64
- {E7336BFB-8521-423A-A140-3123F9065C5D}.Debug|x86.ActiveCfg = Debug|x86
- {E7336BFB-8521-423A-A140-3123F9065C5D}.Debug|x86.Build.0 = Debug|x86
- {E7336BFB-8521-423A-A140-3123F9065C5D}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {E7336BFB-8521-423A-A140-3123F9065C5D}.Release|Any CPU.Build.0 = Release|Any CPU
- {E7336BFB-8521-423A-A140-3123F9065C5D}.Release|x64.ActiveCfg = Release|x64
- {E7336BFB-8521-423A-A140-3123F9065C5D}.Release|x64.Build.0 = Release|x64
- {E7336BFB-8521-423A-A140-3123F9065C5D}.Release|x86.ActiveCfg = Release|x86
- {E7336BFB-8521-423A-A140-3123F9065C5D}.Release|x86.Build.0 = Release|x86
{89D6D382-9B36-43C9-A912-03802FDA8E36}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{89D6D382-9B36-43C9-A912-03802FDA8E36}.Debug|Any CPU.Build.0 = Debug|Any CPU
{89D6D382-9B36-43C9-A912-03802FDA8E36}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -483,11 +487,7 @@ Global
{8DC9D1A0-351B-47BC-A90F-B9DA542550E9} = {0CC4817A-12F3-4357-912C-09315FAAD008}
{D2D1E2D1-B6E0-489F-A36D-1F3047AB87B9} = {0CC4817A-12F3-4357-912C-09315FAAD008}
{37431336-5307-4184-9356-C4B7E47DC714} = {28E5EFE6-C9DD-4FF9-9FEC-532F72DFFA6E}
- {D1392B54-998A-4F27-BC17-4CE149117BCC} = {0CC4817A-12F3-4357-912C-09315FAAD008}
{45DB5F86-7AE3-45C6-870D-F9357B66BDB5} = {0CC4817A-12F3-4357-912C-09315FAAD008}
- {6C88F00F-9597-43AD-9E5F-9B344DA3B16F} = {0CC4817A-12F3-4357-912C-09315FAAD008}
- {B73A7063-37C3-415D-AD53-BB3DA20ABD6E} = {0CC4817A-12F3-4357-912C-09315FAAD008}
- {E0A6BB21-574B-43D9-890D-6E1144F2EE9E} = {0CC4817A-12F3-4357-912C-09315FAAD008}
{A2E7E470-5EFF-4828-B55E-FCBA3650F51C} = {28E5EFE6-C9DD-4FF9-9FEC-532F72DFFA6E}
{1C9FC4B8-54BC-4B6C-BB3A-F5CD59D80A9B} = {A2E7E470-5EFF-4828-B55E-FCBA3650F51C}
{771F3F1E-7A68-4A9D-ADA8-A24F1D5BE71D} = {3FDD425C-FE01-4B56-863E-1FCDD0677CF5}
@@ -500,13 +500,18 @@ Global
{5D1F0032-7B0D-4FB6-A969-FCFB25C9EA1D} = {71F356DC-DFA3-4163-8BFE-D268722CE189}
{650EB7FA-EB0D-4F8E-AB2C-161C3AD8E363} = {71F356DC-DFA3-4163-8BFE-D268722CE189}
{5A7600BD-AED8-44AB-8F2A-7CB33A8D9C02} = {71F356DC-DFA3-4163-8BFE-D268722CE189}
- {E7336BFB-8521-423A-A140-3123F9065C5D} = {0CC4817A-12F3-4357-912C-09315FAAD008}
{89D6D382-9B36-43C9-A912-03802FDA8E36} = {0CC4817A-12F3-4357-912C-09315FAAD008}
{E4C08DCE-DC29-4FEB-B655-1E7287DB5A2B} = {0CC4817A-12F3-4357-912C-09315FAAD008}
{B499E477-C9B1-4087-A5CF-5C762D90E433} = {0CC4817A-12F3-4357-912C-09315FAAD008}
{B93A3149-67E8-491E-A1E5-19D65F9D9E98} = {0CC4817A-12F3-4357-912C-09315FAAD008}
{599A336B-2A5F-473D-8442-1223ED37C93E} = {0CC4817A-12F3-4357-912C-09315FAAD008}
{A314812A-7820-4565-A2A8-ABBE391C11E4} = {4F3CD363-B1E6-4D6D-9466-97D78A56BE45}
+ {869A9BCC-D303-4365-9BF7-958CD6387916} = {71F356DC-DFA3-4163-8BFE-D268722CE189}
+ {CDE508A5-F5D0-4A59-A4EF-978833830727} = {0CC4817A-12F3-4357-912C-09315FAAD008}
+ {D1392B54-998A-4F27-BC17-4CE149117BCC} = {CDE508A5-F5D0-4A59-A4EF-978833830727}
+ {6C88F00F-9597-43AD-9E5F-9B344DA3B16F} = {CDE508A5-F5D0-4A59-A4EF-978833830727}
+ {B73A7063-37C3-415D-AD53-BB3DA20ABD6E} = {CDE508A5-F5D0-4A59-A4EF-978833830727}
+ {E0A6BB21-574B-43D9-890D-6E1144F2EE9E} = {CDE508A5-F5D0-4A59-A4EF-978833830727}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {01D48116-37A2-4D33-B9EC-94793C702431}
diff --git a/src/Microsoft.Data.SqlClient/add-ons/Directory.Build.props b/src/Microsoft.Data.SqlClient/add-ons/Directory.Build.props
index 3ec7e5a49c..4ec39ed694 100644
--- a/src/Microsoft.Data.SqlClient/add-ons/Directory.Build.props
+++ b/src/Microsoft.Data.SqlClient/add-ons/Directory.Build.props
@@ -17,7 +17,6 @@
net462
- netstandard2.0
net6.0
@@ -28,14 +27,13 @@
- $(TargetNetFxVersion);$(TargetNetCoreVersion);$(TargetNetStandardVersion)
- $(TargetNetCoreVersion);$(TargetNetStandardVersion)
+ $(TargetNetCoreVersion);$(TargetNetFxVersion)
+ $(TargetNetCoreVersion)
- netstandard2.0;netstandard2.1
net6.0;net8.0
net462
diff --git a/src/Microsoft.Data.SqlClient/netcore/ref/Microsoft.Data.SqlClient.NetStandard.cs b/src/Microsoft.Data.SqlClient/netcore/ref/Microsoft.Data.SqlClient.NetStandard.cs
deleted file mode 100644
index bdb2042b84..0000000000
--- a/src/Microsoft.Data.SqlClient/netcore/ref/Microsoft.Data.SqlClient.NetStandard.cs
+++ /dev/null
@@ -1,16 +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.
-// ------------------------------------------------------------------------------
-// Changes to this file must follow the http://aka.ms/api-review process.
-// ------------------------------------------------------------------------------
-
-namespace Microsoft.Data.SqlClient
-{
- ///
- public sealed partial class ActiveDirectoryAuthenticationProvider : SqlAuthenticationProvider
- {
- ///
- public void SetParentActivityOrWindowFunc(System.Func