From e941876a4aae9a606b9012260f7d7aaf48eeee08 Mon Sep 17 00:00:00 2001 From: Ben Russell Date: Tue, 13 Jan 2026 16:54:02 -0600 Subject: [PATCH 01/24] Rename manual test project csproj --- build.proj | 4 ++-- src/Microsoft.Data.SqlClient.sln | 2 +- ...sts.csproj => Microsoft.Data.SqlClient.ManualTests.csproj} | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) rename src/Microsoft.Data.SqlClient/tests/ManualTests/{Microsoft.Data.SqlClient.ManualTesting.Tests.csproj => Microsoft.Data.SqlClient.ManualTests.csproj} (99%) diff --git a/build.proj b/build.proj index ef46c58cf5..a89c86d974 100644 --- a/build.proj +++ b/build.proj @@ -91,8 +91,8 @@ - - + + diff --git a/src/Microsoft.Data.SqlClient.sln b/src/Microsoft.Data.SqlClient.sln index 2f290a467f..adcb5de38e 100644 --- a/src/Microsoft.Data.SqlClient.sln +++ b/src/Microsoft.Data.SqlClient.sln @@ -27,7 +27,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Address", "Microsoft.Data.S {407890AC-9876-4FEF-A6F1-F36A876BAADE} = {407890AC-9876-4FEF-A6F1-F36A876BAADE} EndProjectSection EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Data.SqlClient.ManualTesting.Tests", "Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj", "{45DB5F86-7AE3-45C6-870D-F9357B66BDB5}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Data.SqlClient.ManualTests", "Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTests.csproj", "{45DB5F86-7AE3-45C6-870D-F9357B66BDB5}" ProjectSection(ProjectDependencies) = postProject {37431336-5307-4184-9356-C4B7E47DC714} = {37431336-5307-4184-9356-C4B7E47DC714} EndProjectSection diff --git a/src/Microsoft.Data.SqlClient/tests/ManualTests/Microsoft.Data.SqlClient.ManualTesting.Tests.csproj b/src/Microsoft.Data.SqlClient/tests/ManualTests/Microsoft.Data.SqlClient.ManualTests.csproj similarity index 99% rename from src/Microsoft.Data.SqlClient/tests/ManualTests/Microsoft.Data.SqlClient.ManualTesting.Tests.csproj rename to src/Microsoft.Data.SqlClient/tests/ManualTests/Microsoft.Data.SqlClient.ManualTests.csproj index 01133f2ec2..6dbed3d6b0 100644 --- a/src/Microsoft.Data.SqlClient/tests/ManualTests/Microsoft.Data.SqlClient.ManualTesting.Tests.csproj +++ b/src/Microsoft.Data.SqlClient/tests/ManualTests/Microsoft.Data.SqlClient.ManualTests.csproj @@ -11,6 +11,7 @@ $(ObjFolder)$(Configuration).$(Platform).$(AssemblyName) $(BinFolder)$(Configuration).$(Platform).$(AssemblyName) true + Microsoft.Data.SqlClient.ManualTesting.Tests From a965f089d7b4338ecc94556b7f867810bb35c802 Mon Sep 17 00:00:00 2001 From: Ben Russell Date: Tue, 13 Jan 2026 18:33:52 -0600 Subject: [PATCH 02/24] Start cleaning up the ManualTests project file - introduce OS constants, rework test set parameter, group the easy files to group. --- ...icrosoft.Data.SqlClient.ManualTests.csproj | 330 ++++++++++-------- 1 file changed, 193 insertions(+), 137 deletions(-) diff --git a/src/Microsoft.Data.SqlClient/tests/ManualTests/Microsoft.Data.SqlClient.ManualTests.csproj b/src/Microsoft.Data.SqlClient/tests/ManualTests/Microsoft.Data.SqlClient.ManualTests.csproj index 6dbed3d6b0..4c2aba52cd 100644 --- a/src/Microsoft.Data.SqlClient/tests/ManualTests/Microsoft.Data.SqlClient.ManualTests.csproj +++ b/src/Microsoft.Data.SqlClient/tests/ManualTests/Microsoft.Data.SqlClient.ManualTests.csproj @@ -1,77 +1,84 @@  - {45DB5F86-7AE3-45C6-870D-F9357B66BDB5} + ManualTests - netfx - netcoreapp - false - Microsoft.Data.SqlClient.ManualTesting.Tests.ruleset - win - win-$(Platform) - $(ObjFolder)$(Configuration).$(Platform).$(AssemblyName) - $(BinFolder)$(Configuration).$(Platform).$(AssemblyName) + Microsoft.Data.SqlClient.ManualTests true - Microsoft.Data.SqlClient.ManualTesting.Tests - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + $(OS) + + + + + + + + $(TargetOs.ToLower()) + + + + + + + + + + + + 123AE + $(TestSet.ToLower()) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + - - + + + @@ -90,6 +97,7 @@ + @@ -97,22 +105,23 @@ - - + - + - - + + + + @@ -129,16 +138,25 @@ - + + + + + + + + + + @@ -146,31 +164,18 @@ - - - - - - - - - - - - - - - + + + - - + @@ -186,9 +191,20 @@ + + + + + + + + + + + - + @@ -198,9 +214,8 @@ - - + @@ -208,22 +223,95 @@ - + - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {45DB5F86-7AE3-45C6-870D-F9357B66BDB5} + netfx + netcoreapp + false + Microsoft.Data.SqlClient.ManualTesting.Tests.ruleset + win + win-$(Platform) + $(ObjFolder)$(Configuration).$(Platform).$(AssemblyName) + $(BinFolder)$(Configuration).$(Platform).$(AssemblyName) + + + + + + + + + + + + + + + + + + + + + + + + PreserveNewest SqlParameterTest_DebugMode.bsl @@ -249,51 +337,19 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + From fd5ab5d7c59d0443be1677610e861970ea2694b3 Mon Sep 17 00:00:00 2001 From: Ben Russell Date: Wed, 14 Jan 2026 18:31:14 -0600 Subject: [PATCH 03/24] Windows only files for AE tests --- ...{CspProviderExt.cs => CspProviderExt.windows.cs} | 10 +++++----- ...Key.cs => CspProviderColumnMasterKey.windows.cs} | 5 ++++- ...er.cs => SqlSetupStrategyCspProvider.windows.cs} | 4 ++++ .../Microsoft.Data.SqlClient.ManualTests.csproj | 13 ++++++++----- 4 files changed, 21 insertions(+), 11 deletions(-) rename src/Microsoft.Data.SqlClient/tests/ManualTests/AlwaysEncrypted/{CspProviderExt.cs => CspProviderExt.windows.cs} (96%) rename src/Microsoft.Data.SqlClient/tests/ManualTests/AlwaysEncrypted/TestFixtures/Setup/{CspProviderColumnMasterKey.cs => CspProviderColumnMasterKey.windows.cs} (98%) rename src/Microsoft.Data.SqlClient/tests/ManualTests/AlwaysEncrypted/TestFixtures/{SQLSetupStrategyCspProvider.cs => SqlSetupStrategyCspProvider.windows.cs} (99%) diff --git a/src/Microsoft.Data.SqlClient/tests/ManualTests/AlwaysEncrypted/CspProviderExt.cs b/src/Microsoft.Data.SqlClient/tests/ManualTests/AlwaysEncrypted/CspProviderExt.windows.cs similarity index 96% rename from src/Microsoft.Data.SqlClient/tests/ManualTests/AlwaysEncrypted/CspProviderExt.cs rename to src/Microsoft.Data.SqlClient/tests/ManualTests/AlwaysEncrypted/CspProviderExt.windows.cs index 54a4b0c175..fb81905936 100644 --- a/src/Microsoft.Data.SqlClient/tests/ManualTests/AlwaysEncrypted/CspProviderExt.cs +++ b/src/Microsoft.Data.SqlClient/tests/ManualTests/AlwaysEncrypted/CspProviderExt.windows.cs @@ -2,6 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +// TODO: These tests are marked as Windows only for now but should be run for all platforms once the Master Key is accessible to this app from Azure Key Vault. +#if _WINDOWS + using System.Collections.Generic; using System.IO; using System.Linq; @@ -19,12 +22,7 @@ namespace Microsoft.Data.SqlClient.ManualTesting.Tests.AlwaysEncrypted { /// /// Always Encrypted public CspProvider Manual tests. - /// TODO: These tests are marked as Windows only for now but should be run for all platforms once the Master Key is accessible to this app from Azure Key Vault. /// -#if !NETFRAMEWORK - [SupportedOSPlatform("windows")] -#endif - [PlatformSpecific(TestPlatforms.Windows)] public class CspProviderExt { // [Fact(Skip="Run this in non-parallel mode")] or [ConditionalFact()] @@ -142,3 +140,5 @@ private void ValidateResultSet(SqlDataReader sqlDataReader) } } } + +#endif diff --git a/src/Microsoft.Data.SqlClient/tests/ManualTests/AlwaysEncrypted/TestFixtures/Setup/CspProviderColumnMasterKey.cs b/src/Microsoft.Data.SqlClient/tests/ManualTests/AlwaysEncrypted/TestFixtures/Setup/CspProviderColumnMasterKey.windows.cs similarity index 98% rename from src/Microsoft.Data.SqlClient/tests/ManualTests/AlwaysEncrypted/TestFixtures/Setup/CspProviderColumnMasterKey.cs rename to src/Microsoft.Data.SqlClient/tests/ManualTests/AlwaysEncrypted/TestFixtures/Setup/CspProviderColumnMasterKey.windows.cs index 1774140057..ac6662831f 100644 --- a/src/Microsoft.Data.SqlClient/tests/ManualTests/AlwaysEncrypted/TestFixtures/Setup/CspProviderColumnMasterKey.cs +++ b/src/Microsoft.Data.SqlClient/tests/ManualTests/AlwaysEncrypted/TestFixtures/Setup/CspProviderColumnMasterKey.windows.cs @@ -2,7 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; +#if _WINDOWS + using System.Security.Cryptography.X509Certificates; namespace Microsoft.Data.SqlClient.ManualTesting.Tests.AlwaysEncrypted.Setup @@ -29,3 +30,5 @@ public CspProviderColumnMasterKey(string name, string providerName, string cspKe } } + +#endif diff --git a/src/Microsoft.Data.SqlClient/tests/ManualTests/AlwaysEncrypted/TestFixtures/SQLSetupStrategyCspProvider.cs b/src/Microsoft.Data.SqlClient/tests/ManualTests/AlwaysEncrypted/TestFixtures/SqlSetupStrategyCspProvider.windows.cs similarity index 99% rename from src/Microsoft.Data.SqlClient/tests/ManualTests/AlwaysEncrypted/TestFixtures/SQLSetupStrategyCspProvider.cs rename to src/Microsoft.Data.SqlClient/tests/ManualTests/AlwaysEncrypted/TestFixtures/SqlSetupStrategyCspProvider.windows.cs index 08cdfe48ec..88863fe750 100644 --- a/src/Microsoft.Data.SqlClient/tests/ManualTests/AlwaysEncrypted/TestFixtures/SQLSetupStrategyCspProvider.cs +++ b/src/Microsoft.Data.SqlClient/tests/ManualTests/AlwaysEncrypted/TestFixtures/SqlSetupStrategyCspProvider.windows.cs @@ -2,6 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information.using System; +#if _WINDOWS + using System; using System.Collections.Generic; using System.Security.Cryptography; @@ -75,3 +77,5 @@ protected override void Dispose(bool disposing) } } } + +#endif diff --git a/src/Microsoft.Data.SqlClient/tests/ManualTests/Microsoft.Data.SqlClient.ManualTests.csproj b/src/Microsoft.Data.SqlClient/tests/ManualTests/Microsoft.Data.SqlClient.ManualTests.csproj index 4c2aba52cd..335f530f89 100644 --- a/src/Microsoft.Data.SqlClient/tests/ManualTests/Microsoft.Data.SqlClient.ManualTests.csproj +++ b/src/Microsoft.Data.SqlClient/tests/ManualTests/Microsoft.Data.SqlClient.ManualTests.csproj @@ -21,6 +21,11 @@ $(TargetOs.ToLower()) + + + + $(DefineConstants);_UNIX + $(DefineConstants);_WINDOWS + @@ -263,6 +269,7 @@ + @@ -274,6 +281,7 @@ + @@ -290,11 +298,6 @@ $(BinFolder)$(Configuration).$(Platform).$(AssemblyName) - - - - - From b16aba13f696f5c10b3510583aea3a6c45175b7d Mon Sep 17 00:00:00 2001 From: Ben Russell Date: Wed, 14 Jan 2026 18:41:06 -0600 Subject: [PATCH 04/24] More conditionally included files --- ...yReadTests.cs => DateOnlyReadTests.netcore.cs} | 4 ++++ .../Microsoft.Data.SqlClient.ManualTests.csproj | 15 +++------------ ....cs => SqlDataSourceEnumeratorTest.windows.cs} | 7 ++++--- ....cs => DistributedTransactionTest.Windows2.cs} | 14 ++++++++------ 4 files changed, 19 insertions(+), 21 deletions(-) rename src/Microsoft.Data.SqlClient/tests/ManualTests/AlwaysEncrypted/{DateOnlyReadTests.cs => DateOnlyReadTests.netcore.cs} (99%) rename src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/SqlDSEnumeratorTest/{SqlDataSourceEnumeratorTest.cs => SqlDataSourceEnumeratorTest.windows.cs} (97%) rename src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/TransactionTest/{DistributedTransactionTest.Windows.cs => DistributedTransactionTest.Windows2.cs} (98%) diff --git a/src/Microsoft.Data.SqlClient/tests/ManualTests/AlwaysEncrypted/DateOnlyReadTests.cs b/src/Microsoft.Data.SqlClient/tests/ManualTests/AlwaysEncrypted/DateOnlyReadTests.netcore.cs similarity index 99% rename from src/Microsoft.Data.SqlClient/tests/ManualTests/AlwaysEncrypted/DateOnlyReadTests.cs rename to src/Microsoft.Data.SqlClient/tests/ManualTests/AlwaysEncrypted/DateOnlyReadTests.netcore.cs index 2cd1e18019..679fb4bf07 100644 --- a/src/Microsoft.Data.SqlClient/tests/ManualTests/AlwaysEncrypted/DateOnlyReadTests.cs +++ b/src/Microsoft.Data.SqlClient/tests/ManualTests/AlwaysEncrypted/DateOnlyReadTests.netcore.cs @@ -2,6 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#if NET + using System; using System.Collections; using System.Collections.Generic; @@ -91,3 +93,5 @@ public IEnumerator GetEnumerator() IEnumerator IEnumerable.GetEnumerator() => GetEnumerator(); } } + +#endif diff --git a/src/Microsoft.Data.SqlClient/tests/ManualTests/Microsoft.Data.SqlClient.ManualTests.csproj b/src/Microsoft.Data.SqlClient/tests/ManualTests/Microsoft.Data.SqlClient.ManualTests.csproj index 335f530f89..957e2756d4 100644 --- a/src/Microsoft.Data.SqlClient/tests/ManualTests/Microsoft.Data.SqlClient.ManualTests.csproj +++ b/src/Microsoft.Data.SqlClient/tests/ManualTests/Microsoft.Data.SqlClient.ManualTests.csproj @@ -170,6 +170,7 @@ + @@ -219,6 +220,7 @@ + @@ -250,6 +252,7 @@ + @@ -298,20 +301,8 @@ $(BinFolder)$(Configuration).$(Platform).$(AssemblyName) - - - - - - - - - - - - diff --git a/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/SqlDSEnumeratorTest/SqlDataSourceEnumeratorTest.cs b/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/SqlDSEnumeratorTest/SqlDataSourceEnumeratorTest.windows.cs similarity index 97% rename from src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/SqlDSEnumeratorTest/SqlDataSourceEnumeratorTest.cs rename to src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/SqlDSEnumeratorTest/SqlDataSourceEnumeratorTest.windows.cs index a81731c0a1..6835705c4d 100644 --- a/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/SqlDSEnumeratorTest/SqlDataSourceEnumeratorTest.cs +++ b/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/SqlDSEnumeratorTest/SqlDataSourceEnumeratorTest.windows.cs @@ -2,6 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#if _WINDOWS + using System; using System.ComponentModel; using System.Linq; @@ -11,9 +13,6 @@ namespace Microsoft.Data.SqlClient.ManualTesting.Tests { -#if !NETFRAMEWORK - [System.Runtime.Versioning.SupportedOSPlatform("windows")] -#endif public class SqlDataSourceEnumeratorTest { private static bool IsEnvironmentAvailable() @@ -80,3 +79,5 @@ private SqlDataSourceEnumerator GetDSEnumerator() } } } + +#endif diff --git a/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/TransactionTest/DistributedTransactionTest.Windows.cs b/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/TransactionTest/DistributedTransactionTest.Windows2.cs similarity index 98% rename from src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/TransactionTest/DistributedTransactionTest.Windows.cs rename to src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/TransactionTest/DistributedTransactionTest.Windows2.cs index b4462840ca..85f4b288d5 100644 --- a/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/TransactionTest/DistributedTransactionTest.Windows.cs +++ b/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/TransactionTest/DistributedTransactionTest.Windows2.cs @@ -2,12 +2,12 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#if _WINDOWS + using System; using System.Data; -using System.Runtime.InteropServices; using System.Threading.Tasks; using System.Transactions; -using Microsoft.Data.SqlClient.TestUtilities; using Xunit; namespace Microsoft.Data.SqlClient.ManualTesting.Tests @@ -17,7 +17,7 @@ namespace Microsoft.Data.SqlClient.ManualTesting.Tests public class DistributedTransactionTestWindows { -#if NET + #if NET private static bool s_DelegatedTransactionCondition => DataTestUtility.AreConnStringsSetup() && DataTestUtility.IsNotAzureServer() && DataTestUtility.IsNotX86Architecture; [ConditionalFact(nameof(s_DelegatedTransactionCondition), Timeout = 10000)] @@ -43,7 +43,7 @@ public async Task Delegated_transaction_deadlock_in_SinglePhaseCommit() // Possible deadlock transaction.Commit(); } -#endif + #endif /** Test fails on SQL Managed Instance with error: * Failure: Item not found in collection @@ -56,9 +56,10 @@ public async Task Delegated_transaction_deadlock_in_SinglePhaseCommit() [ConditionalFact(nameof(s_EnlistedTransactionPreservedWhilePooledCondition), Timeout = 10000)] public async Task Test_EnlistedTransactionPreservedWhilePooled() { -#if NET + #if NET TransactionManager.ImplicitDistributedTransactions = true; -#endif + #endif + await RunTestSet(EnlistedTransactionPreservedWhilePooled); } @@ -181,3 +182,4 @@ private static async Task RunTestSet(Func TestCase) } } +#endif From 459e12ce847ffe1efa6bfc883125550feb344d10 Mon Sep 17 00:00:00 2001 From: Ben Russell Date: Wed, 14 Jan 2026 18:41:38 -0600 Subject: [PATCH 05/24] fix casing on DistributedTransactionTest --- ...tionTest.Windows2.cs => DistributedTransactionTest.windows.cs} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/TransactionTest/{DistributedTransactionTest.Windows2.cs => DistributedTransactionTest.windows.cs} (100%) diff --git a/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/TransactionTest/DistributedTransactionTest.Windows2.cs b/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/TransactionTest/DistributedTransactionTest.windows.cs similarity index 100% rename from src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/TransactionTest/DistributedTransactionTest.Windows2.cs rename to src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/TransactionTest/DistributedTransactionTest.windows.cs From a8cb19541496f5c7b280eec3518ec1dd4d9fcb0d Mon Sep 17 00:00:00 2001 From: Ben Russell Date: Wed, 14 Jan 2026 19:02:10 -0600 Subject: [PATCH 06/24] Rest of the conditional files. --- ...soft.Data.SqlClient.FunctionalTests.csproj | 4 +- ...icrosoft.Data.SqlClient.ManualTests.csproj | 57 ++++++------------- .../{BatchTests.cs => BatchTests.netcore.cs} | 6 +- .../ConnectionPoolTest.Debug.cs | 10 +++- ...olTest.cs => TransactionPoolTest.netfx.cs} | 4 ++ 5 files changed, 35 insertions(+), 46 deletions(-) rename src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/Batch/{BatchTests.cs => BatchTests.netcore.cs} (99%) rename src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/ConnectionPoolTest/{TransactionPoolTest.cs => TransactionPoolTest.netfx.cs} (99%) diff --git a/src/Microsoft.Data.SqlClient/tests/FunctionalTests/Microsoft.Data.SqlClient.FunctionalTests.csproj b/src/Microsoft.Data.SqlClient/tests/FunctionalTests/Microsoft.Data.SqlClient.FunctionalTests.csproj index 3cdd360113..3611c305a9 100644 --- a/src/Microsoft.Data.SqlClient/tests/FunctionalTests/Microsoft.Data.SqlClient.FunctionalTests.csproj +++ b/src/Microsoft.Data.SqlClient/tests/FunctionalTests/Microsoft.Data.SqlClient.FunctionalTests.csproj @@ -22,10 +22,10 @@ Always - + PreserveNewest xunit.runner.json - + diff --git a/src/Microsoft.Data.SqlClient/tests/ManualTests/Microsoft.Data.SqlClient.ManualTests.csproj b/src/Microsoft.Data.SqlClient/tests/ManualTests/Microsoft.Data.SqlClient.ManualTests.csproj index 957e2756d4..4f832a33d9 100644 --- a/src/Microsoft.Data.SqlClient/tests/ManualTests/Microsoft.Data.SqlClient.ManualTests.csproj +++ b/src/Microsoft.Data.SqlClient/tests/ManualTests/Microsoft.Data.SqlClient.ManualTests.csproj @@ -181,9 +181,12 @@ + + + @@ -240,6 +243,18 @@ + + + + + + + @@ -288,7 +303,7 @@ - + {45DB5F86-7AE3-45C6-870D-F9357B66BDB5} netfx @@ -300,46 +315,6 @@ $(ObjFolder)$(Configuration).$(Platform).$(AssemblyName) $(BinFolder)$(Configuration).$(Platform).$(AssemblyName) - - - - - - - - PreserveNewest - SqlParameterTest_DebugMode.bsl - - - PreserveNewest - SqlParameterTest_DebugMode_Azure.bsl - - - PreserveNewest - SqlParameterTest_ReleaseMode.bsl - - - PreserveNewest - SqlParameterTest_ReleaseMode_Azure.bsl - - - PreserveNewest - data.xml - - - - - - - - - - - - - - - diff --git a/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/Batch/BatchTests.cs b/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/Batch/BatchTests.netcore.cs similarity index 99% rename from src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/Batch/BatchTests.cs rename to src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/Batch/BatchTests.netcore.cs index a883eb9b88..175e81521b 100644 --- a/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/Batch/BatchTests.cs +++ b/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/Batch/BatchTests.netcore.cs @@ -2,6 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#if NET + using System; using System.Collections.Generic; using System.Data; @@ -63,7 +65,6 @@ public static void ConnectionCanCreateBatch() } } -#if NET8_0_OR_GREATER [ConditionalFact(typeof(DataTestUtility), nameof(DataTestUtility.AreConnStringsSetup))] public static void SqlBatchCanCreateParameter() { @@ -81,7 +82,6 @@ public static void SqlBatchCanCreateParameter() batch.BatchCommands.Add(batchCommand); batch.ExecuteNonQuery(); } -#endif [ConditionalFact(typeof(DataTestUtility), nameof(DataTestUtility.AreConnStringsSetup))] public static void StoredProcedureBatchSupported() @@ -663,3 +663,5 @@ private static bool TryExecuteNonQueryCommand(string command) } } } + +#endif diff --git a/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/ConnectionPoolTest/ConnectionPoolTest.Debug.cs b/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/ConnectionPoolTest/ConnectionPoolTest.Debug.cs index 5881d4d5d3..130ef02934 100644 --- a/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/ConnectionPoolTest/ConnectionPoolTest.Debug.cs +++ b/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/ConnectionPoolTest/ConnectionPoolTest.Debug.cs @@ -1,4 +1,10 @@ -using System; +// 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. + +#if DEBUG + +using System; using System.Runtime.ExceptionServices; using System.Threading; using System.Threading.Tasks; @@ -204,3 +210,5 @@ public static void ReplacementConnectionObeys0TimeoutTest(string connectionStrin } } } + +#endif diff --git a/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/ConnectionPoolTest/TransactionPoolTest.cs b/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/ConnectionPoolTest/TransactionPoolTest.netfx.cs similarity index 99% rename from src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/ConnectionPoolTest/TransactionPoolTest.cs rename to src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/ConnectionPoolTest/TransactionPoolTest.netfx.cs index 5a6051625d..6ea47f6eb7 100644 --- a/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/ConnectionPoolTest/TransactionPoolTest.cs +++ b/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/ConnectionPoolTest/TransactionPoolTest.netfx.cs @@ -2,6 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#if NETFRAMEWORK + using System.Transactions; using Xunit; @@ -103,3 +105,5 @@ public static void TransactionCleanupTest(string connectionString) } } } + +#endif From 906f4354dde2275bc640c4ed35a29eac430136be Mon Sep 17 00:00:00 2001 From: Ben Russell Date: Thu, 15 Jan 2026 13:58:53 -0600 Subject: [PATCH 07/24] References and such --- ...icrosoft.Data.SqlClient.ManualTests.csproj | 179 ++++++++++-------- 1 file changed, 97 insertions(+), 82 deletions(-) diff --git a/src/Microsoft.Data.SqlClient/tests/ManualTests/Microsoft.Data.SqlClient.ManualTests.csproj b/src/Microsoft.Data.SqlClient/tests/ManualTests/Microsoft.Data.SqlClient.ManualTests.csproj index 4f832a33d9..6ec60830d3 100644 --- a/src/Microsoft.Data.SqlClient/tests/ManualTests/Microsoft.Data.SqlClient.ManualTests.csproj +++ b/src/Microsoft.Data.SqlClient/tests/ManualTests/Microsoft.Data.SqlClient.ManualTests.csproj @@ -4,6 +4,9 @@ ManualTests Microsoft.Data.SqlClient.ManualTests true + + + false @@ -71,6 +74,16 @@ + + + + + + @@ -304,98 +317,100 @@ - - {45DB5F86-7AE3-45C6-870D-F9357B66BDB5} - netfx - netcoreapp - false - Microsoft.Data.SqlClient.ManualTesting.Tests.ruleset - win - win-$(Platform) - $(ObjFolder)$(Configuration).$(Platform).$(AssemblyName) - $(BinFolder)$(Configuration).$(Platform).$(AssemblyName) - - - - - - + + - - Common - - - Address - - - Circle - - - Shapes - - - Utf8String - - - - - - - - - + + + + + + + - - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + - + + + + + + + + + + + + + + + + + + + + - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - PreserveNewest - %(Filename)%(Extension) - - - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - Always - - - PreserveNewest - xunit.runner.json - - + + + + + + + + + From 6c71e6a8152c696037496a427cf7f4921178fc47 Mon Sep 17 00:00:00 2001 From: Ben Russell Date: Thu, 15 Jan 2026 17:28:22 -0600 Subject: [PATCH 08/24] Comments from *last* PR --- .../Microsoft.Data.SqlClient.FunctionalTests.csproj | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/Microsoft.Data.SqlClient/tests/FunctionalTests/Microsoft.Data.SqlClient.FunctionalTests.csproj b/src/Microsoft.Data.SqlClient/tests/FunctionalTests/Microsoft.Data.SqlClient.FunctionalTests.csproj index 3611c305a9..2d195a13f9 100644 --- a/src/Microsoft.Data.SqlClient/tests/FunctionalTests/Microsoft.Data.SqlClient.FunctionalTests.csproj +++ b/src/Microsoft.Data.SqlClient/tests/FunctionalTests/Microsoft.Data.SqlClient.FunctionalTests.csproj @@ -7,8 +7,14 @@ - + + + + + + + @@ -16,8 +22,8 @@ - - + + Always From dd02f92b051a81df40fff2d4c512f5d7b69a5a46 Mon Sep 17 00:00:00 2001 From: Ben Russell Date: Fri, 16 Jan 2026 13:44:18 -0600 Subject: [PATCH 09/24] Point AKV Provider at the common MDS project --- ...waysEncrypted.AzureKeyVaultProvider.csproj | 53 ++++++++++--------- ...icrosoft.Data.SqlClient.ManualTests.csproj | 1 - 2 files changed, 29 insertions(+), 25 deletions(-) diff --git a/src/Microsoft.Data.SqlClient/add-ons/AzureKeyVaultProvider/Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider.csproj b/src/Microsoft.Data.SqlClient/add-ons/AzureKeyVaultProvider/Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider.csproj index 31f6b3fcb1..5e23a7b681 100644 --- a/src/Microsoft.Data.SqlClient/add-ons/AzureKeyVaultProvider/Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider.csproj +++ b/src/Microsoft.Data.SqlClient/add-ons/AzureKeyVaultProvider/Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider.csproj @@ -1,40 +1,45 @@  - Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider - AzureKeyVaultProvider - {9073ABEF-92E0-4702-BB23-2C99CEF9BDD7} - netcoreapp - netfx - Debug;Release; - AnyCPU;x86;x64 - $(ObjFolder)$(Configuration).$(Platform)\$(AddOnName) - $(BinFolder)$(Configuration).$(Platform)\$(AddOnName) - $(BinFolder)$(Configuration).$(Platform)\$(AssemblyName).xml - - false + Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider MIT true - true - true - - - true - $(SigningKeyPath) + + + + + $(BinFolder)$(Configuration).$(Platform)\$(AddOnName) + $(ObjFolder)$(Configuration).$(Platform)\$(AddOnName) + $(BinFolder)$(Configuration).$(Platform)\$(AssemblyName).xml + + + + true + true + + + $(SigningKeyPath) + + true + $(SigningKeyPath) + + + + - - - - - - + + + + diff --git a/src/Microsoft.Data.SqlClient/tests/ManualTests/Microsoft.Data.SqlClient.ManualTests.csproj b/src/Microsoft.Data.SqlClient/tests/ManualTests/Microsoft.Data.SqlClient.ManualTests.csproj index 6ec60830d3..d18f846e89 100644 --- a/src/Microsoft.Data.SqlClient/tests/ManualTests/Microsoft.Data.SqlClient.ManualTests.csproj +++ b/src/Microsoft.Data.SqlClient/tests/ManualTests/Microsoft.Data.SqlClient.ManualTests.csproj @@ -411,6 +411,5 @@ - From 0835da7aeed666f265bbffe7e77c756f3002bf02 Mon Sep 17 00:00:00 2001 From: Ben Russell Date: Fri, 23 Jan 2026 15:33:23 -0600 Subject: [PATCH 10/24] Fix tests that had names that conflict with helper methods. Not sure why this is just now a problem, but ok, I'll fix it. --- .../SQL/SqlCommand/SqlCommandCancelTest.cs | 114 +++------ .../SQL/UdtTest/SqlServerTypesTest.cs | 235 ++++++++---------- 2 files changed, 132 insertions(+), 217 deletions(-) diff --git a/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/SqlCommand/SqlCommandCancelTest.cs b/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/SqlCommand/SqlCommandCancelTest.cs index 9f20521f08..97c225c9ca 100644 --- a/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/SqlCommand/SqlCommandCancelTest.cs +++ b/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/SqlCommand/SqlCommandCancelTest.cs @@ -18,59 +18,43 @@ public static class SqlCommandCancelTest // Synapse: Remove dependency on Northwind database + WAITFOR not supported + ';' not supported [ConditionalFact(typeof(DataTestUtility), nameof(DataTestUtility.AreConnStringsSetup), nameof(DataTestUtility.IsNotAzureSynapse))] - public static void PlainCancelTest() - { + public static void PlainCancelTest_Tcp() => PlainCancel(tcp_connStr); - } [ConditionalFact(typeof(DataTestUtility), nameof(DataTestUtility.AreConnStringsSetup), nameof(DataTestUtility.IsNotAzureServer))] [PlatformSpecific(TestPlatforms.Windows)] - public static void PlainCancelTestNP() - { + public static void PlainCancelTest_NamedPipe() => PlainCancel(np_connStr); - } - + // Synapse: Remove dependency on Northwind database + WAITFOR not supported + ';' not supported [ConditionalFact(typeof(DataTestUtility), nameof(DataTestUtility.AreConnStringsSetup), nameof(DataTestUtility.IsNotAzureSynapse))] - public static void PlainMARSCancelTest() - { + public static void PlainCancelTest_TcpMars() => PlainCancel((new SqlConnectionStringBuilder(tcp_connStr) { MultipleActiveResultSets = true }).ConnectionString); - } [ConditionalFact(typeof(DataTestUtility), nameof(DataTestUtility.AreConnStringsSetup), nameof(DataTestUtility.IsNotAzureServer))] [PlatformSpecific(TestPlatforms.Windows)] - public static void PlainMARSCancelTestNP() - { + public static void PlainCancelTest_NamedPipeMars() => PlainCancel((new SqlConnectionStringBuilder(np_connStr) { MultipleActiveResultSets = true }).ConnectionString); - } // Synapse: Remove dependency on Northwind database + WAITFOR not supported + ';' not supported [ConditionalFact(typeof(DataTestUtility), nameof(DataTestUtility.AreConnStringsSetup), nameof(DataTestUtility.IsNotAzureSynapse))] - public static void PlainCancelTestAsync() - { + public static void PlainCancelTestAsync_Tcp() => PlainCancelAsync(tcp_connStr); - } [ConditionalFact(typeof(DataTestUtility), nameof(DataTestUtility.AreConnStringsSetup), nameof(DataTestUtility.IsNotAzureServer))] [PlatformSpecific(TestPlatforms.Windows)] - public static void PlainCancelTestAsyncNP() - { + public static void PlainCancelTestAsync_NamedPipe() => PlainCancelAsync(np_connStr); - } // Synapse: Remove dependency from Northwind database + WAITFOR not supported + ';' not supported. [ConditionalFact(typeof(DataTestUtility), nameof(DataTestUtility.AreConnStringsSetup), nameof(DataTestUtility.IsNotAzureSynapse))] - public static void PlainMARSCancelTestAsync() - { + public static void PlainCancelTestAsync_TcpMars() => PlainCancelAsync((new SqlConnectionStringBuilder(tcp_connStr) { MultipleActiveResultSets = true }).ConnectionString); - } [ConditionalFact(typeof(DataTestUtility), nameof(DataTestUtility.AreConnStringsSetup), nameof(DataTestUtility.IsNotAzureServer))] [PlatformSpecific(TestPlatforms.Windows)] - public static void PlainMARSCancelTestAsyncNP() - { + public static void PlainCancelTestAsync_NamedPipeMars() => PlainCancelAsync((new SqlConnectionStringBuilder(np_connStr) { MultipleActiveResultSets = true }).ConnectionString); - } private static void PlainCancel(string connString) { @@ -124,126 +108,90 @@ private static void PlainCancelAsync(string connString) // Synapse: Remove dependency from Northwind database + WAITFOR not supported + ';' not supported. [ConditionalFact(typeof(DataTestUtility), nameof(DataTestUtility.AreConnStringsSetup), nameof(DataTestUtility.IsNotAzureServer))] - public static void MultiThreadedCancel_NonAsync() - { + public static void MultiThreadedCancel_TcpSync() => MultiThreadedCancel(tcp_connStr, false); - } [ConditionalFact(typeof(DataTestUtility), nameof(DataTestUtility.AreConnStringsSetup), nameof(DataTestUtility.IsNotAzureServer))] [PlatformSpecific(TestPlatforms.Windows)] - public static void MultiThreadedCancel_NonAsyncNP() - { + public static void MultiThreadedCancel_NamedPipeSync() => MultiThreadedCancel(np_connStr, false); - } // Synapse: Remove dependency from Northwind database + WAITFOR not supported + ';' not supported. [ConditionalFact(typeof(DataTestUtility), nameof(DataTestUtility.AreConnStringsSetup), nameof(DataTestUtility.IsNotAzureSynapse))] - public static void MultiThreadedCancel_Async() - { + public static void MultiThreadedCancel_TcpAsync() => MultiThreadedCancel(tcp_connStr, true); - } [ConditionalFact(typeof(DataTestUtility), nameof(DataTestUtility.AreConnStringsSetup), nameof(DataTestUtility.IsNotAzureServer))] [PlatformSpecific(TestPlatforms.Windows)] - public static void MultiThreadedCancel_AsyncNP() - { + public static void MultiThreadedCancel_NamedPipeAsync() => MultiThreadedCancel(np_connStr, true); - } // Synapse: WAITFOR not supported + ';' not supported. [ConditionalFact(typeof(DataTestUtility), nameof(DataTestUtility.AreConnStringsSetup), nameof(DataTestUtility.IsNotAzureServer))] - public static void TimeoutCancelTcp() - { + public static void TimeoutCancel_Tcp() => TimeoutCancel(tcp_connStr); - } [ActiveIssue("https://github.com/dotnet/SqlClient/issues/3755")] [ConditionalFact(typeof(DataTestUtility), nameof(DataTestUtility.AreConnStringsSetup), nameof(DataTestUtility.IsNotAzureServer))] [PlatformSpecific(TestPlatforms.Windows)] - public static void TimeoutCancelNamedPipe() - { + public static void TimeoutCancel_NamedPipe() => TimeoutCancel(np_connStr); - } [ConditionalFact(typeof(DataTestUtility), nameof(DataTestUtility.AreConnStringsSetup))] - public static void CancelAndDisposePreparedCommand() - { + public static void CancelAndDisposePreparedCommand_Tcp() => CancelAndDisposePreparedCommand(tcp_connStr); - } [ConditionalFact(typeof(DataTestUtility), nameof(DataTestUtility.AreConnStringsSetup), nameof(DataTestUtility.IsNotAzureServer))] [PlatformSpecific(TestPlatforms.Windows)] - public static void CancelAndDisposePreparedCommandNP() - { + public static void CancelAndDisposePreparedCommand_NamedPipe() => CancelAndDisposePreparedCommand(np_connStr); - } [ConditionalFact(typeof(DataTestUtility), nameof(DataTestUtility.AreConnStringsSetup), nameof(DataTestUtility.IsNotAzureServer), nameof(DataTestUtility.IsNotNamedInstance))] - public static void TimeOutDuringReadTcp() - { + public static void TimeOutDuringRead_Tcp() => TimeOutDuringRead(tcp_connStr); - } [ConditionalFact(typeof(DataTestUtility), nameof(DataTestUtility.AreConnStringsSetup), nameof(DataTestUtility.IsNotAzureServer), nameof(DataTestUtility.IsNotNamedInstance))] [PlatformSpecific(TestPlatforms.Windows)] - public static void TimeOutDuringReadNamedPipe() - { + public static void TimeOutDuringRead_NamedPipe() => TimeOutDuringRead(np_connStr); - } // Synapse: WAITFOR not supported + ';' not supported. [ConditionalFact(typeof(DataTestUtility), nameof(DataTestUtility.AreConnStringsSetup), nameof(DataTestUtility.IsNotAzureSynapse))] - public static void CancelDoesNotWait() - { + public static void CancelDoesNotWait_Tcp() => CancelDoesNotWait(tcp_connStr); - } [ConditionalFact(typeof(DataTestUtility), nameof(DataTestUtility.AreConnStringsSetup), nameof(DataTestUtility.IsNotAzureServer))] [PlatformSpecific(TestPlatforms.Windows)] - public static void CancelDoesNotWaitNP() - { + public static void CancelDoesNotWait_NamedPipe() => CancelDoesNotWait(np_connStr); - } // Synapse: WAITFOR not supported + ';' not supported. [ConditionalFact(typeof(DataTestUtility), nameof(DataTestUtility.AreConnStringsSetup), nameof(DataTestUtility.IsNotAzureSynapse))] - public static void AsyncCancelDoesNotWait() - { - AsyncCancelDoesNotWait(tcp_connStr).Wait(); - } + public static Task CancelDoesNotWait_TcpAsync() => + CancelDoesNotWaitAsync(tcp_connStr); [ConditionalFact(typeof(DataTestUtility), nameof(DataTestUtility.AreConnStringsSetup), nameof(DataTestUtility.IsNotAzureServer))] [PlatformSpecific(TestPlatforms.Windows)] - public static void AsyncCancelDoesNotWaitNP() - { - AsyncCancelDoesNotWait(np_connStr).Wait(); - } + public static Task CancelDoesNotWait_NamedPipeAsync() => + CancelDoesNotWaitAsync(np_connStr); [ConditionalFact(typeof(DataTestUtility), nameof(DataTestUtility.AreConnStringsSetup))] - public static void TCPAttentionPacketTestTransaction() - { + public static void AttentionPacketTestTransaction_Tcp() => CancelFollowedByTransaction(tcp_connStr); - } [ConditionalFact(typeof(DataTestUtility), nameof(DataTestUtility.AreConnStringsSetup), nameof(DataTestUtility.IsNotAzureServer))] [PlatformSpecific(TestPlatforms.Windows)] - public static void NPAttentionPacketTestTransaction() - { + public static void AttentionPacketTestTransaction_NamedPipe() => CancelFollowedByTransaction(np_connStr); - } [ConditionalFact(typeof(DataTestUtility), nameof(DataTestUtility.AreConnStringsSetup), nameof(DataTestUtility.IsNotAzureServer))] - public static void TCPAttentionPacketTestAlerts() - { + public static void AttentionPacketTestAlerts_Tcp() => CancelFollowedByAlert(tcp_connStr); - } [ConditionalFact(typeof(DataTestUtility), nameof(DataTestUtility.AreConnStringsSetup), nameof(DataTestUtility.IsNotAzureServer))] [PlatformSpecific(TestPlatforms.Windows)] - public static void NPAttentionPacketTestAlerts() - { + public static void AttentionPacketTestAlerts_NamedPipe() => CancelFollowedByAlert(np_connStr); - } private static void CancelFollowedByTransaction(string constr) { @@ -378,7 +326,7 @@ private static void CancelAndDisposePreparedCommand(string constr) try { // Generate a query with a large number of results. - using (var command = new SqlCommand("select @P from sysobjects a cross join sysobjects b cross join sysobjects c cross join sysobjects d cross join sysobjects e cross join sysobjects f", connection)) + using (var command = new SqlCommand("select @P from sys.objects a cross join sys.objects b cross join sys.objects c cross join sys.objects d cross join sys.objects e cross join sys.objects f", connection)) { command.Parameters.Add(new SqlParameter("@P", SqlDbType.Int) { Value = expectedValue }); connection.Open(); @@ -530,7 +478,7 @@ private static void CancelDoesNotWait(string connStr) } } - private static async Task AsyncCancelDoesNotWait(string connStr) + private static async Task CancelDoesNotWaitAsync(string connStr) { const int delaySeconds = 30; const int cancelSeconds = 1; diff --git a/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/UdtTest/SqlServerTypesTest.cs b/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/UdtTest/SqlServerTypesTest.cs index 67a5cf2748..52d1acf9a0 100644 --- a/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/UdtTest/SqlServerTypesTest.cs +++ b/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/UdtTest/SqlServerTypesTest.cs @@ -18,6 +18,21 @@ namespace Microsoft.Data.SqlClient.ManualTesting.Tests { public static class SqlServerTypesTest { + private const string BuiltInUdtSelectQuery = + "SELECT " + + " hierarchyid::Parse('/1/1/3/') AS col0, " + + " geometry::Parse('LINESTRING (100 100, 20 180, 180 180') AS col1, " + + " geography::Parse('LINESTRING (-122.360 47.656, -122.343 47.656)' AS col2"; + + private const string GeometryBytesHexString = + "00000000010403000000000000000000594000000000000059400000000000003440000000000080" + + "66400000000000806640000000000080664001000000010000000001000000ffffffff0000000002"; + + private const string GeographyBytesHexString = + "e610000001148716d9cef7d34740d7a3703d0a975ec08716d9cef7d34740cba145b6f3955ec0"; + + private const string HierarchyIdBytesHexString = "5ade"; + // Synapse: Parse error at line: 1, column: 48: Incorrect syntax near 'hierarchyid'. [ConditionalFact(typeof(DataTestUtility), nameof(DataTestUtility.AreConnStringsSetup), nameof(DataTestUtility.IsNotAzureSynapse))] public static void GetSchemaTableTest() @@ -82,171 +97,123 @@ public static void TestUdtZeroByte() } // Synapse: Parse error at line: 1, column: 8: Incorrect syntax near 'hierarchyid'. - [ConditionalFact(typeof(DataTestUtility), nameof(DataTestUtility.AreConnStringsSetup), nameof(DataTestUtility.IsNotAzureSynapse))] - public static void TestUdtSqlDataReaderGetSqlBytesSequentialAccess() - { - TestUdtSqlDataReaderGetSqlBytes(CommandBehavior.SequentialAccess); - } - - // Synapse: Parse error at line: 1, column: 8: Incorrect syntax near 'hierarchyid'. - [ConditionalFact(typeof(DataTestUtility), nameof(DataTestUtility.AreConnStringsSetup), nameof(DataTestUtility.IsNotAzureSynapse))] - public static void TestUdtSqlDataReaderGetSqlBytes() + [ConditionalTheory(typeof(DataTestUtility), nameof(DataTestUtility.AreConnStringsSetup), nameof(DataTestUtility.IsNotAzureSynapse))] + [InlineData(CommandBehavior.Default)] + [InlineData(CommandBehavior.SequentialAccess)] + public static void TestUdtSqlDataReaderGetSqlBytes(CommandBehavior behavior) { - TestUdtSqlDataReaderGetSqlBytes(CommandBehavior.Default); - } + // Arrange + using SqlConnection connection = new SqlConnection(DataTestUtility.TCPConnectionString); + connection.Open(); - private static void TestUdtSqlDataReaderGetSqlBytes(CommandBehavior behavior) - { - using (SqlConnection connection = new SqlConnection(DataTestUtility.TCPConnectionString)) - { - connection.Open(); - SqlCommand command = connection.CreateCommand(); - command.CommandText = "select hierarchyid::Parse('/1/1/3/') as col0, geometry::Parse('LINESTRING (100 100, 20 180, 180 180)') as col1, geography::Parse('LINESTRING(-122.360 47.656, -122.343 47.656)') as col2"; - using (SqlDataReader reader = command.ExecuteReader(behavior)) - { - Assert.True(reader.Read()); + using SqlCommand command = connection.CreateCommand(); + command.CommandType = CommandType.Text; + command.CommandText = BuiltInUdtSelectQuery; - SqlBytes sqlBytes = null; + using SqlDataReader reader = command.ExecuteReader(behavior); + reader.Read(); - sqlBytes = reader.GetSqlBytes(0); - Assert.Equal("5ade", ToHexString(sqlBytes.Value)); + // Act / Assert + void ActAndAssert(int index, string expectedHexString) + { + // Act + SqlBytes sqlBytes = reader.GetSqlBytes(index); - sqlBytes = reader.GetSqlBytes(1); - Assert.Equal("0000000001040300000000000000000059400000000000005940000000000000344000000000008066400000000000806640000000000080664001000000010000000001000000ffffffff0000000002", ToHexString(sqlBytes.Value)); + // Assert + Assert.Equal(expectedHexString, ToHexString(sqlBytes.Value)); + } - sqlBytes = reader.GetSqlBytes(2); - Assert.Equal("e610000001148716d9cef7d34740d7a3703d0a975ec08716d9cef7d34740cba145b6f3955ec0", ToHexString(sqlBytes.Value)); + ActAndAssert(0, HierarchyIdBytesHexString); + ActAndAssert(1, GeometryBytesHexString); + ActAndAssert(2, GeographyBytesHexString); - if (behavior == CommandBehavior.Default) - { - sqlBytes = reader.GetSqlBytes(0); - Assert.Equal("5ade", ToHexString(sqlBytes.Value)); - } - } + // - In default behavior, ensure reading columns out of order works + if (behavior is CommandBehavior.Default) + { + ActAndAssert(0, HierarchyIdBytesHexString); } } // Synapse: Parse error at line: 1, column: 8: Incorrect syntax near 'hierarchyid'. - [ConditionalFact(typeof(DataTestUtility), nameof(DataTestUtility.AreConnStringsSetup), nameof(DataTestUtility.IsNotAzureSynapse))] - public static void TestUdtSqlDataReaderGetBytesSequentialAccess() + [ConditionalTheory(typeof(DataTestUtility), nameof(DataTestUtility.AreConnStringsSetup), nameof(DataTestUtility.IsNotAzureSynapse))] + [InlineData(CommandBehavior.Default)] + [InlineData(CommandBehavior.SequentialAccess)] + public static void TestUdtSqlDataReaderGetBytesSequentialAccess(CommandBehavior behavior) { - TestUdtSqlDataReaderGetBytes(CommandBehavior.SequentialAccess); - } + // Arrange + using SqlConnection connection = new SqlConnection(DataTestUtility.TCPConnectionString); + connection.Open(); - // Synapse: Parse error at line: 1, column: 8: Incorrect syntax near 'hierarchyid'. - [ConditionalFact(typeof(DataTestUtility), nameof(DataTestUtility.AreConnStringsSetup), nameof(DataTestUtility.IsNotAzureSynapse))] - public static void TestUdtSqlDataReaderGetBytes() - { - TestUdtSqlDataReaderGetBytes(CommandBehavior.Default); - } + using SqlCommand command = connection.CreateCommand(); + command.CommandType = CommandType.Text; + command.CommandText = BuiltInUdtSelectQuery; - private static void TestUdtSqlDataReaderGetBytes(CommandBehavior behavior) - { - using (SqlConnection connection = new SqlConnection(DataTestUtility.TCPConnectionString)) - { - connection.Open(); - SqlCommand command = connection.CreateCommand(); - command.CommandText = "select hierarchyid::Parse('/1/1/3/') as col0, geometry::Parse('LINESTRING (100 100, 20 180, 180 180)') as col1, geography::Parse('LINESTRING(-122.360 47.656, -122.343 47.656)') as col2"; - using (SqlDataReader reader = command.ExecuteReader(behavior)) - { - Assert.True(reader.Read()); + using SqlDataReader reader = command.ExecuteReader(behavior); + reader.Read(); - int byteCount = 0; - byte[] bytes = null; + // Act / Assert + void ActAndAssert(int index, string expectedHexString) + { + // Act + int byteCount = (int)reader.GetBytes(index, 0, null, 0, 0); - byteCount = (int)reader.GetBytes(0, 0, null, 0, 0); - Assert.True(byteCount > 0); - bytes = new byte[byteCount]; - reader.GetBytes(0, 0, bytes, 0, bytes.Length); - Assert.Equal("5ade", ToHexString(bytes)); + byte[] bytes = new byte[byteCount]; + reader.GetBytes(index, 0, bytes, 0, bytes.Length); - byteCount = (int)reader.GetBytes(1, 0, null, 0, 0); - Assert.True(byteCount > 0); - bytes = new byte[byteCount]; - reader.GetBytes(1, 0, bytes, 0, bytes.Length); - Assert.Equal("0000000001040300000000000000000059400000000000005940000000000000344000000000008066400000000000806640000000000080664001000000010000000001000000ffffffff0000000002", ToHexString(bytes)); + // Assert + Assert.Equal(expectedHexString, ToHexString(bytes)); + } - byteCount = (int)reader.GetBytes(2, 0, null, 0, 0); - Assert.True(byteCount > 0); - bytes = new byte[byteCount]; - reader.GetBytes(2, 0, bytes, 0, bytes.Length); - Assert.Equal("e610000001148716d9cef7d34740d7a3703d0a975ec08716d9cef7d34740cba145b6f3955ec0", ToHexString(bytes)); + ActAndAssert(0, HierarchyIdBytesHexString); + ActAndAssert(1, GeometryBytesHexString); + ActAndAssert(2, GeographyBytesHexString); - if (behavior == CommandBehavior.Default) - { - byteCount = (int)reader.GetBytes(0, 0, null, 0, 0); - Assert.True(byteCount > 0); - bytes = new byte[byteCount]; - reader.GetBytes(0, 0, bytes, 0, bytes.Length); - Assert.Equal("5ade", ToHexString(bytes)); - } - } + // - In default behavior, ensure reading columns out of order works + if (behavior is CommandBehavior.Default) + { + ActAndAssert(0, HierarchyIdBytesHexString); } } // Synapse: Parse error at line: 1, column: 8: Incorrect syntax near 'hierarchyid'. - [ConditionalFact(typeof(DataTestUtility), nameof(DataTestUtility.AreConnStringsSetup), nameof(DataTestUtility.IsNotAzureSynapse))] - public static void TestUdtSqlDataReaderGetStreamSequentialAccess() + [ConditionalTheory(typeof(DataTestUtility), nameof(DataTestUtility.AreConnStringsSetup), nameof(DataTestUtility.IsNotAzureSynapse))] + [InlineData(CommandBehavior.Default)] + [InlineData(CommandBehavior.SequentialAccess)] + public static void TestUdtSqlDataReaderGetStream(CommandBehavior behavior) { - TestUdtSqlDataReaderGetStream(CommandBehavior.SequentialAccess); - } + // Arrange + using SqlConnection connection = new SqlConnection(DataTestUtility.TCPConnectionString); + connection.Open(); - // Synapse: Parse error at line: 1, column: 8: Incorrect syntax near 'hierarchyid'. - [ConditionalFact(typeof(DataTestUtility), nameof(DataTestUtility.AreConnStringsSetup), nameof(DataTestUtility.IsNotAzureSynapse))] - public static void TestUdtSqlDataReaderGetStream() - { - TestUdtSqlDataReaderGetStream(CommandBehavior.Default); - } + using SqlCommand command = connection.CreateCommand(); + command.CommandType = CommandType.Text; + command.CommandText = BuiltInUdtSelectQuery; - private static void TestUdtSqlDataReaderGetStream(CommandBehavior behavior) - { - using (SqlConnection connection = new SqlConnection(DataTestUtility.TCPConnectionString)) - { - connection.Open(); - SqlCommand command = connection.CreateCommand(); - command.CommandText = "select hierarchyid::Parse('/1/1/3/') as col0, geometry::Parse('LINESTRING (100 100, 20 180, 180 180)') as col1, geography::Parse('LINESTRING(-122.360 47.656, -122.343 47.656)') as col2"; - using (SqlDataReader reader = command.ExecuteReader(behavior)) - { - Assert.True(reader.Read()); + using SqlDataReader reader = command.ExecuteReader(behavior); + reader.Read(); - MemoryStream buffer = null; - byte[] bytes = null; + // Act / Assert + void ActAndAssert(int index, string expectedHexString) + { + // Act + MemoryStream buffer = new MemoryStream(); + using Stream stream = reader.GetStream(index); + stream.CopyTo(buffer); - buffer = new MemoryStream(); - using (Stream stream = reader.GetStream(0)) - { - stream.CopyTo(buffer); - } - bytes = buffer.ToArray(); - Assert.Equal("5ade", ToHexString(bytes)); + byte[] bytes = buffer.ToArray(); - buffer = new MemoryStream(); - using (Stream stream = reader.GetStream(1)) - { - stream.CopyTo(buffer); - } - bytes = buffer.ToArray(); - Assert.Equal("0000000001040300000000000000000059400000000000005940000000000000344000000000008066400000000000806640000000000080664001000000010000000001000000ffffffff0000000002", ToHexString(bytes)); + // Assert + Assert.Equal(expectedHexString, ToHexString(bytes)); + } - buffer = new MemoryStream(); - using (Stream stream = reader.GetStream(2)) - { - stream.CopyTo(buffer); - } - bytes = buffer.ToArray(); - Assert.Equal("e610000001148716d9cef7d34740d7a3703d0a975ec08716d9cef7d34740cba145b6f3955ec0", ToHexString(bytes)); + ActAndAssert(0, HierarchyIdBytesHexString); + ActAndAssert(1, GeometryBytesHexString); + ActAndAssert(2, GeographyBytesHexString); - if (behavior == CommandBehavior.Default) - { - buffer = new MemoryStream(); - using (Stream stream = reader.GetStream(0)) - { - stream.CopyTo(buffer); - } - bytes = buffer.ToArray(); - Assert.Equal("5ade", ToHexString(bytes)); - } - } + // - In default behavior, ensure reading columns out of order works + if (behavior is CommandBehavior.Default) + { + ActAndAssert(0, HierarchyIdBytesHexString); } } From 7a1eb7eb6775dc9fbe01425b5311de658f9a5461 Mon Sep 17 00:00:00 2001 From: Ben Russell Date: Fri, 23 Jan 2026 15:34:06 -0600 Subject: [PATCH 11/24] Finish work on the Manual tests csproj --- ...icrosoft.Data.SqlClient.ManualTests.csproj | 76 ++++++------------- 1 file changed, 24 insertions(+), 52 deletions(-) diff --git a/src/Microsoft.Data.SqlClient/tests/ManualTests/Microsoft.Data.SqlClient.ManualTests.csproj b/src/Microsoft.Data.SqlClient/tests/ManualTests/Microsoft.Data.SqlClient.ManualTests.csproj index d18f846e89..8879976365 100644 --- a/src/Microsoft.Data.SqlClient/tests/ManualTests/Microsoft.Data.SqlClient.ManualTests.csproj +++ b/src/Microsoft.Data.SqlClient/tests/ManualTests/Microsoft.Data.SqlClient.ManualTests.csproj @@ -31,7 +31,7 @@ $(DefineConstants);_WINDOWS - @@ -76,14 +76,10 @@ - - - - + + + + @@ -258,16 +254,11 @@ - - - - - + + + + + @@ -318,17 +309,18 @@ - + - - + + + + + @@ -337,26 +329,19 @@ - + - + - - + + @@ -374,8 +359,7 @@ - + @@ -384,14 +368,10 @@ - - + + - + @@ -404,12 +384,4 @@ - - - - - - - - From 27d1c9669414d84353df3c774b459ef874f3cd9c Mon Sep 17 00:00:00 2001 From: Ben Russell Date: Mon, 26 Jan 2026 18:39:19 -0600 Subject: [PATCH 12/24] Wire up manual test targets as per last two projects --- build.proj | 42 ++++++++++++------------------------------ 1 file changed, 12 insertions(+), 30 deletions(-) diff --git a/build.proj b/build.proj index a89c86d974..677f5401e3 100644 --- a/build.proj +++ b/build.proj @@ -102,8 +102,12 @@ - - + + + + + + @@ -256,24 +260,6 @@ - - - - - - - - - - - - - - - - - - @@ -383,13 +369,10 @@ $(DotnetPath)dotnet test "@(ManualTestsProj)" - --no-build - -v n + -f $(TF) -p:Configuration=$(Configuration) - -p:Target$(TFGroup)Version=$(TF) -p:ReferenceType=$(ReferenceType) -p:TestSet=$(TestSet) - -p:TestTargetOS=Windows$(TargetGroup) $(CollectStatement) --results-directory $(ResultsDirectory) --filter "$(FilterStatement)" @@ -398,7 +381,8 @@ --blame-hang-dump-type full --blame-hang-timeout 10m - $(TestCommand.Replace($([System.Environment]::NewLine), " ")) + + $([System.Text.RegularExpressions.Regex]::Replace($(TestCommand), "\s+", " ")) @@ -409,13 +393,10 @@ $(DotnetPath)dotnet test "@(ManualTestsProj)" - --no-build - -v n + -f $(TF) -p:Configuration=$(Configuration) - -p:TargetNetCoreVersion=$(TF) -p:ReferenceType=$(ReferenceType) -p:TestSet=$(TestSet) - -p:TestTargetOS=Unixnetcoreapp $(CollectStatement) --results-directory $(ResultsDirectory) --filter "$(FilterStatement)" @@ -424,7 +405,8 @@ --blame-hang-dump-type full --blame-hang-timeout 10m - $(TestCommand.Replace($([System.Environment]::NewLine), " ")) + + $([System.Text.RegularExpressions.Regex]::Replace($(TestCommand), "\s+", " ")) From 2ac9ab667da1261e0eb8e9bc6c4794013729ed8e Mon Sep 17 00:00:00 2001 From: Ben Russell Date: Tue, 27 Jan 2026 13:15:46 -0600 Subject: [PATCH 13/24] Remove unnecesary projects from build.proj, copilot comments on SqlServerTypesTest --- build.proj | 11 ----------- .../ManualTests/SQL/UdtTest/SqlServerTypesTest.cs | 8 ++++---- 2 files changed, 4 insertions(+), 15 deletions(-) diff --git a/build.proj b/build.proj index 677f5401e3..02d4785452 100644 --- a/build.proj +++ b/build.proj @@ -80,17 +80,6 @@ - - - - - - - - - - - diff --git a/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/UdtTest/SqlServerTypesTest.cs b/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/UdtTest/SqlServerTypesTest.cs index 52d1acf9a0..70969ef363 100644 --- a/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/UdtTest/SqlServerTypesTest.cs +++ b/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/UdtTest/SqlServerTypesTest.cs @@ -19,10 +19,10 @@ namespace Microsoft.Data.SqlClient.ManualTesting.Tests public static class SqlServerTypesTest { private const string BuiltInUdtSelectQuery = - "SELECT " + - " hierarchyid::Parse('/1/1/3/') AS col0, " + - " geometry::Parse('LINESTRING (100 100, 20 180, 180 180') AS col1, " + - " geography::Parse('LINESTRING (-122.360 47.656, -122.343 47.656)' AS col2"; + @"SELECT " + + @" hierarchyid::Parse('/1/1/3/') AS col0, " + + @" geometry::Parse('LINESTRING (100 100, 20 180, 180 180')) AS col1, " + + @" geography::Parse('LINESTRING (-122.360 47.656, -122.343 47.656))' AS col2"; private const string GeometryBytesHexString = "00000000010403000000000000000000594000000000000059400000000000003440000000000080" + From 594c166e0604a0379306a6a27b825635bc4b06bf Mon Sep 17 00:00:00 2001 From: Ben Russell Date: Tue, 27 Jan 2026 13:18:07 -0600 Subject: [PATCH 14/24] Replace $(AddonName) with AzureKeyVaultProvider --- ...a.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider.csproj | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Microsoft.Data.SqlClient/add-ons/AzureKeyVaultProvider/Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider.csproj b/src/Microsoft.Data.SqlClient/add-ons/AzureKeyVaultProvider/Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider.csproj index 5e23a7b681..f4e370f7c0 100644 --- a/src/Microsoft.Data.SqlClient/add-ons/AzureKeyVaultProvider/Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider.csproj +++ b/src/Microsoft.Data.SqlClient/add-ons/AzureKeyVaultProvider/Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider.csproj @@ -9,9 +9,9 @@ - $(BinFolder)$(Configuration).$(Platform)\$(AddOnName) - $(ObjFolder)$(Configuration).$(Platform)\$(AddOnName) - $(BinFolder)$(Configuration).$(Platform)\$(AssemblyName).xml + $(BinFolder)$(Configuration).$(Platform)\AzureKeyVaultProvider + $(ObjFolder)$(Configuration).$(Platform)\AzureKeyVaultProvider + $(BinFolder)$(Configuration).$(Platform)\AzureKeyVaultProvider.xml From 68515bb65a86359d9b3b012a6c15d7d7baa5608d Mon Sep 17 00:00:00 2001 From: Ben Russell Date: Tue, 27 Jan 2026 14:05:52 -0600 Subject: [PATCH 15/24] I just want to see if I can get the manual tests running correctly. Will come back to address pipeline and build.proj issues Conflict resolution - not entirely sure what's going in this conflict. Hope to fix resolve it properly soon. --- build.proj | 27 ++++++--------------------- 1 file changed, 6 insertions(+), 21 deletions(-) diff --git a/build.proj b/build.proj index 02d4785452..572f8aa789 100644 --- a/build.proj +++ b/build.proj @@ -443,31 +443,16 @@ - - - - - - - - + + - - - - - - - - + + - - - - - + + From e896c6aeef93d96540c6e0ce6da274d517b7f8ed Mon Sep 17 00:00:00 2001 From: Ben Russell Date: Wed, 28 Jan 2026 14:29:05 -0600 Subject: [PATCH 16/24] Move test data files, fix references --- .../DDDataTypesTest/DDDataTypesTest.cs | 2 +- .../data.xml => DDDataTypesTest_Data.xml} | 0 ...icrosoft.Data.SqlClient.ManualTests.csproj | 49 +++++++++++++------ .../SqlParameterTest_DebugMode.bsl | 0 .../SqlParameterTest_DebugMode_Azure.bsl | 0 .../SqlParameterTest_ReleaseMode.bsl | 0 .../SqlParameterTest_ReleaseMode_Azure.bsl | 0 7 files changed, 35 insertions(+), 16 deletions(-) rename src/Microsoft.Data.SqlClient/tests/ManualTests/{DDBasics/DDDataTypesTest/data.xml => DDDataTypesTest_Data.xml} (100%) rename src/Microsoft.Data.SqlClient/tests/ManualTests/{SQL/ParameterTest => }/SqlParameterTest_DebugMode.bsl (100%) rename src/Microsoft.Data.SqlClient/tests/ManualTests/{SQL/ParameterTest => }/SqlParameterTest_DebugMode_Azure.bsl (100%) rename src/Microsoft.Data.SqlClient/tests/ManualTests/{SQL/ParameterTest => }/SqlParameterTest_ReleaseMode.bsl (100%) rename src/Microsoft.Data.SqlClient/tests/ManualTests/{SQL/ParameterTest => }/SqlParameterTest_ReleaseMode_Azure.bsl (100%) diff --git a/src/Microsoft.Data.SqlClient/tests/ManualTests/DDBasics/DDDataTypesTest/DDDataTypesTest.cs b/src/Microsoft.Data.SqlClient/tests/ManualTests/DDBasics/DDDataTypesTest/DDDataTypesTest.cs index 0d1e0e7e68..eda1a2c788 100644 --- a/src/Microsoft.Data.SqlClient/tests/ManualTests/DDBasics/DDDataTypesTest/DDDataTypesTest.cs +++ b/src/Microsoft.Data.SqlClient/tests/ManualTests/DDBasics/DDDataTypesTest/DDDataTypesTest.cs @@ -39,7 +39,7 @@ public static void XmlTest() SqlCommand cmd2 = new SqlCommand(insertParamStr, conn); cmd2.Parameters.Add("@x", SqlDbType.Xml); - XmlReader xr = XmlReader.Create("data.xml"); + XmlReader xr = XmlReader.Create("DDDataTypesTest_Data.xml"); cmd2.Parameters[0].Value = new SqlXml(xr); cmd2.ExecuteNonQuery(); diff --git a/src/Microsoft.Data.SqlClient/tests/ManualTests/DDBasics/DDDataTypesTest/data.xml b/src/Microsoft.Data.SqlClient/tests/ManualTests/DDDataTypesTest_Data.xml similarity index 100% rename from src/Microsoft.Data.SqlClient/tests/ManualTests/DDBasics/DDDataTypesTest/data.xml rename to src/Microsoft.Data.SqlClient/tests/ManualTests/DDDataTypesTest_Data.xml diff --git a/src/Microsoft.Data.SqlClient/tests/ManualTests/Microsoft.Data.SqlClient.ManualTests.csproj b/src/Microsoft.Data.SqlClient/tests/ManualTests/Microsoft.Data.SqlClient.ManualTests.csproj index 8879976365..df59cd1916 100644 --- a/src/Microsoft.Data.SqlClient/tests/ManualTests/Microsoft.Data.SqlClient.ManualTests.csproj +++ b/src/Microsoft.Data.SqlClient/tests/ManualTests/Microsoft.Data.SqlClient.ManualTests.csproj @@ -254,11 +254,17 @@ - - - - - + + + + + + @@ -316,8 +322,10 @@ - - + + @@ -329,19 +337,26 @@ - + - + - - + + @@ -359,7 +374,8 @@ - + @@ -368,11 +384,14 @@ - - + + - diff --git a/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/ParameterTest/SqlParameterTest_DebugMode.bsl b/src/Microsoft.Data.SqlClient/tests/ManualTests/SqlParameterTest_DebugMode.bsl similarity index 100% rename from src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/ParameterTest/SqlParameterTest_DebugMode.bsl rename to src/Microsoft.Data.SqlClient/tests/ManualTests/SqlParameterTest_DebugMode.bsl diff --git a/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/ParameterTest/SqlParameterTest_DebugMode_Azure.bsl b/src/Microsoft.Data.SqlClient/tests/ManualTests/SqlParameterTest_DebugMode_Azure.bsl similarity index 100% rename from src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/ParameterTest/SqlParameterTest_DebugMode_Azure.bsl rename to src/Microsoft.Data.SqlClient/tests/ManualTests/SqlParameterTest_DebugMode_Azure.bsl diff --git a/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/ParameterTest/SqlParameterTest_ReleaseMode.bsl b/src/Microsoft.Data.SqlClient/tests/ManualTests/SqlParameterTest_ReleaseMode.bsl similarity index 100% rename from src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/ParameterTest/SqlParameterTest_ReleaseMode.bsl rename to src/Microsoft.Data.SqlClient/tests/ManualTests/SqlParameterTest_ReleaseMode.bsl diff --git a/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/ParameterTest/SqlParameterTest_ReleaseMode_Azure.bsl b/src/Microsoft.Data.SqlClient/tests/ManualTests/SqlParameterTest_ReleaseMode_Azure.bsl similarity index 100% rename from src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/ParameterTest/SqlParameterTest_ReleaseMode_Azure.bsl rename to src/Microsoft.Data.SqlClient/tests/ManualTests/SqlParameterTest_ReleaseMode_Azure.bsl From ce66b8f7d782a27bef47c44e96e75e7989e390f8 Mon Sep 17 00:00:00 2001 From: Ben Russell Date: Wed, 28 Jan 2026 14:36:05 -0600 Subject: [PATCH 17/24] Comments from copilot --- ....Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider.csproj | 2 +- .../tests/ManualTests/SQL/UdtTest/SqlServerTypesTest.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Microsoft.Data.SqlClient/add-ons/AzureKeyVaultProvider/Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider.csproj b/src/Microsoft.Data.SqlClient/add-ons/AzureKeyVaultProvider/Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider.csproj index f4e370f7c0..646de8a432 100644 --- a/src/Microsoft.Data.SqlClient/add-ons/AzureKeyVaultProvider/Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider.csproj +++ b/src/Microsoft.Data.SqlClient/add-ons/AzureKeyVaultProvider/Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider.csproj @@ -11,7 +11,7 @@ $(BinFolder)$(Configuration).$(Platform)\AzureKeyVaultProvider $(ObjFolder)$(Configuration).$(Platform)\AzureKeyVaultProvider - $(BinFolder)$(Configuration).$(Platform)\AzureKeyVaultProvider.xml + $(BinFolder)$(Configuration).$(Platform)\$(AssemblyName).xml diff --git a/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/UdtTest/SqlServerTypesTest.cs b/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/UdtTest/SqlServerTypesTest.cs index 70969ef363..6dc173c4e1 100644 --- a/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/UdtTest/SqlServerTypesTest.cs +++ b/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/UdtTest/SqlServerTypesTest.cs @@ -138,7 +138,7 @@ void ActAndAssert(int index, string expectedHexString) [ConditionalTheory(typeof(DataTestUtility), nameof(DataTestUtility.AreConnStringsSetup), nameof(DataTestUtility.IsNotAzureSynapse))] [InlineData(CommandBehavior.Default)] [InlineData(CommandBehavior.SequentialAccess)] - public static void TestUdtSqlDataReaderGetBytesSequentialAccess(CommandBehavior behavior) + public static void TestUdtSqlDataReaderGetBytes(CommandBehavior behavior) { // Arrange using SqlConnection connection = new SqlConnection(DataTestUtility.TCPConnectionString); From eb11190685685b5f546a8f2a448b8de2ecb4f169 Mon Sep 17 00:00:00 2001 From: Ben Russell Date: Thu, 29 Jan 2026 18:35:17 -0600 Subject: [PATCH 18/24] Fixing local test runs from build.proj to include all test sets. --- build.proj | 11 ++++++++++- .../Microsoft.Data.SqlClient.ManualTests.csproj | 6 +++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/build.proj b/build.proj index 572f8aa789..ea2d2ff752 100644 --- a/build.proj +++ b/build.proj @@ -361,7 +361,6 @@ -f $(TF) -p:Configuration=$(Configuration) -p:ReferenceType=$(ReferenceType) - -p:TestSet=$(TestSet) $(CollectStatement) --results-directory $(ResultsDirectory) --filter "$(FilterStatement)" @@ -370,6 +369,16 @@ --blame-hang-dump-type full --blame-hang-timeout 10m + + + + $(TestCommand) + -p:TestSet=$(TestSet) + + $([System.Text.RegularExpressions.Regex]::Replace($(TestCommand), "\s+", " ")) diff --git a/src/Microsoft.Data.SqlClient/tests/ManualTests/Microsoft.Data.SqlClient.ManualTests.csproj b/src/Microsoft.Data.SqlClient/tests/ManualTests/Microsoft.Data.SqlClient.ManualTests.csproj index df59cd1916..743b73ceb6 100644 --- a/src/Microsoft.Data.SqlClient/tests/ManualTests/Microsoft.Data.SqlClient.ManualTests.csproj +++ b/src/Microsoft.Data.SqlClient/tests/ManualTests/Microsoft.Data.SqlClient.ManualTests.csproj @@ -70,9 +70,6 @@ - - - @@ -89,6 +86,9 @@ + + + From d4debef6653b1b933f82970e4eaf22001927cb75 Mon Sep 17 00:00:00 2001 From: Ben Russell Date: Thu, 29 Jan 2026 18:40:45 -0600 Subject: [PATCH 19/24] Making restore test targets no-ops temporarily --- build.proj | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/build.proj b/build.proj index ea2d2ff752..4b07acf127 100644 --- a/build.proj +++ b/build.proj @@ -90,7 +90,6 @@ - @@ -192,16 +191,16 @@ - - + + - - + + From 6c146fea53ca1805563a62f59185813d18b4d2b1 Mon Sep 17 00:00:00 2001 From: Ben Russell Date: Fri, 30 Jan 2026 11:37:14 -0600 Subject: [PATCH 20/24] SqlMetaData resolution in common MDS project Rewrite VerifyGetCommand in adapter test to no longer use reflection/dynamic invocation --- .../src/Microsoft.Data.SqlClient.csproj | 3 +- .../src/Microsoft.Data.SqlClient.csproj | 8 +- .../SQL/AdapterTest/AdapterTest.cs | 92 ++++++++++++------- 3 files changed, 66 insertions(+), 37 deletions(-) diff --git a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj b/src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj index c5cc017919..6e4df12792 100644 --- a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj +++ b/src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj @@ -1049,9 +1049,10 @@ Resources\ILLink.Substitutions.xml + Resources\Microsoft.Data.SqlCLient.SqlMetaData.xml - Microsoft.Data.SqlClient.SqlMetaData.xml + Microsoft.Data.SqlClient.SqlMetaData.xml diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft.Data.SqlClient.csproj b/src/Microsoft.Data.SqlClient/src/Microsoft.Data.SqlClient.csproj index 8505df0724..77f727a1f0 100644 --- a/src/Microsoft.Data.SqlClient/src/Microsoft.Data.SqlClient.csproj +++ b/src/Microsoft.Data.SqlClient/src/Microsoft.Data.SqlClient.csproj @@ -81,9 +81,15 @@ - + + + Resources\Microsoft.Data.SqlCLient.SqlMetaData.xml + Microsoft.Data.SqlClient.SqlMetaData.xml + + Microsoft.Data.SqlClient.Resources.Strings.resources diff --git a/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/AdapterTest/AdapterTest.cs b/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/AdapterTest/AdapterTest.cs index 552fbf3119..5b498b7318 100644 --- a/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/AdapterTest/AdapterTest.cs +++ b/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/AdapterTest/AdapterTest.cs @@ -1398,45 +1398,67 @@ public void TestReadOnlyColumnMetadata() } [ConditionalTheory(typeof(DataTestUtility), nameof(DataTestUtility.AreConnStringsSetup), nameof(DataTestUtility.IsNotAzureSynapse))] - [InlineData(nameof(SqlCommandBuilder.GetInsertCommand), null)] - [InlineData(nameof(SqlCommandBuilder.GetInsertCommand), true)] - [InlineData(nameof(SqlCommandBuilder.GetInsertCommand), false)] - [InlineData(nameof(SqlCommandBuilder.GetUpdateCommand), null)] - [InlineData(nameof(SqlCommandBuilder.GetUpdateCommand), true)] - [InlineData(nameof(SqlCommandBuilder.GetUpdateCommand), false)] - [InlineData(nameof(SqlCommandBuilder.GetDeleteCommand), null)] - [InlineData(nameof(SqlCommandBuilder.GetDeleteCommand), false)] - [InlineData(nameof(SqlCommandBuilder.GetDeleteCommand), true)] - public void VerifyGetCommand(string methodName, bool? useColumnsForParameterNames) + [InlineData(null)] + [InlineData(false)] + [InlineData(true)] + public void VerifyDeleteCommand(bool? useColumnsForParameterNames) { - using (SqlConnection connection = new SqlConnection(DataTestUtility.TCPConnectionString)) + if (useColumnsForParameterNames.HasValue) { - connection.Open(); - using (SqlDataAdapter dataAdapter = new SqlDataAdapter("SELECT * FROM dbo.Customers", connection)) - { - using (SqlCommandBuilder commandBuilder = new SqlCommandBuilder(dataAdapter)) - { - object[] parameters = null; - Type[] parameterTypes = null; - if (useColumnsForParameterNames != null) - { - parameters = new object[] { useColumnsForParameterNames }; - parameterTypes = new Type[] { typeof(bool) }; - } - else - { - parameters = new object[] { }; - parameterTypes = new Type[] { }; - } + VerifyGetCommand(commandBuilder => commandBuilder.GetDeleteCommand(useColumnsForParameterNames.Value)); + } + else + { + VerifyGetCommand(commandBuilder => commandBuilder.GetDeleteCommand()); + } + } - MethodInfo method = commandBuilder.GetType().GetMethod(methodName, parameterTypes); - using (SqlCommand cmd = (SqlCommand)method.Invoke(commandBuilder, parameters)) - { - Assert.NotNull(cmd); - } - } - } + [ConditionalTheory(typeof(DataTestUtility), nameof(DataTestUtility.AreConnStringsSetup), nameof(DataTestUtility.IsNotAzureSynapse))] + [InlineData(null)] + [InlineData(false)] + [InlineData(true)] + public void VerifyInsertCommand(bool? useColumnsForParameterNames) + { + if (useColumnsForParameterNames.HasValue) + { + VerifyGetCommand(commandBuilder => commandBuilder.GetInsertCommand(useColumnsForParameterNames.Value)); + } + else + { + VerifyGetCommand(commandBuilder => commandBuilder.GetInsertCommand()); + } + } + + [ConditionalTheory(typeof(DataTestUtility), nameof(DataTestUtility.AreConnStringsSetup), nameof(DataTestUtility.IsNotAzureSynapse))] + [InlineData(null)] + [InlineData(false)] + [InlineData(true)] + public void VerifyUpdateCommand(bool? useColumnsForParameterNames) + { + if (useColumnsForParameterNames.HasValue) + { + VerifyGetCommand(commandBuilder => commandBuilder.GetUpdateCommand(useColumnsForParameterNames.Value)); } + else + { + VerifyGetCommand(commandBuilder => commandBuilder.GetUpdateCommand()); + } + } + + private static void VerifyGetCommand(Func getFunc) + { + // Arrange + using SqlConnection connection = new SqlConnection(DataTestUtility.TCPConnectionString); + connection.Open(); + + using SqlDataAdapter dataAdapter = new SqlDataAdapter("SELECT * FROM dbo.Customers", connection); + using SqlCommandBuilder commandBuilder = new SqlCommandBuilder(dataAdapter); + + // Act + using SqlCommand command = getFunc(commandBuilder); + + // Assert + Assert.NotNull(command); } #region Utility_Methods From 124ae7b70ff38845cd129bf9d18141d5edf3c31a Mon Sep 17 00:00:00 2001 From: Ben Russell Date: Fri, 30 Jan 2026 19:39:33 -0600 Subject: [PATCH 21/24] Fix typos in a test I shouldn't have messed with so much --- .../tests/ManualTests/SQL/UdtTest/SqlServerTypesTest.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/UdtTest/SqlServerTypesTest.cs b/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/UdtTest/SqlServerTypesTest.cs index 6dc173c4e1..3719a09328 100644 --- a/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/UdtTest/SqlServerTypesTest.cs +++ b/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/UdtTest/SqlServerTypesTest.cs @@ -21,8 +21,8 @@ public static class SqlServerTypesTest private const string BuiltInUdtSelectQuery = @"SELECT " + @" hierarchyid::Parse('/1/1/3/') AS col0, " + - @" geometry::Parse('LINESTRING (100 100, 20 180, 180 180')) AS col1, " + - @" geography::Parse('LINESTRING (-122.360 47.656, -122.343 47.656))' AS col2"; + @" geometry::Parse('LINESTRING (100 100, 20 180, 180 180)') AS col1, " + + @" geography::Parse('LINESTRING (-122.360 47.656, -122.343 47.656)') AS col2"; private const string GeometryBytesHexString = "00000000010403000000000000000000594000000000000059400000000000003440000000000080" + From e46caf2e8e218d50652036041a87b0b4d262be7b Mon Sep 17 00:00:00 2001 From: Ben Russell Date: Mon, 2 Feb 2026 14:14:25 -0600 Subject: [PATCH 22/24] Tired of having to have a separate editor for build.proj. Adding AKV build target to build2.proj --- build2.proj | 31 +++++++++++++++++++++++++++---- src/Microsoft.Data.SqlClient.sln | 4 ++++ 2 files changed, 31 insertions(+), 4 deletions(-) diff --git a/build2.proj b/build2.proj index 479d802f12..2d5916497e 100644 --- a/build2.proj +++ b/build2.proj @@ -1,6 +1,7 @@ - + + @@ -11,13 +12,15 @@ - + - + + - + + $(RepoRoot)src/Microsoft.Data.SqlClient/src/Microsoft.Data.SqlClient.csproj @@ -54,4 +57,24 @@ + + + + + $(RepoRoot)src/Microsoft.Data.SqlClient/add-ons/AzureKeyVaultProvider/Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider.csproj + + + + + + $(DotnetPath)dotnet build $(AkvProjectPath) + -p:Configuration=$(Configuration) + + + $([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " ")) + + + + + diff --git a/src/Microsoft.Data.SqlClient.sln b/src/Microsoft.Data.SqlClient.sln index adcb5de38e..db17cec85d 100644 --- a/src/Microsoft.Data.SqlClient.sln +++ b/src/Microsoft.Data.SqlClient.sln @@ -213,6 +213,10 @@ EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Data.SqlClient", "Microsoft.Data.SqlClient\src\Microsoft.Data.SqlClient.csproj", "{9A8996A8-6484-4AA7-B50F-F861430EDE2F}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "eng", "eng", "{4600328C-C134-499F-AAE2-964E8AD5472C}" + ProjectSection(SolutionItems) = preProject + ..\build.proj = ..\build.proj + ..\build2.proj = ..\build2.proj + EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "pipelines", "pipelines", "{4CAE9195-4F1A-4D48-854C-1C9FBC512C66}" ProjectSection(SolutionItems) = preProject From 1992b59669e1c860a3d5ea0f1a260ebfa4ce8a15 Mon Sep 17 00:00:00 2001 From: Ben Russell Date: Mon, 2 Feb 2026 18:42:46 -0600 Subject: [PATCH 23/24] Remove RestoreTests* targets --- build.proj | 8 -------- 1 file changed, 8 deletions(-) diff --git a/build.proj b/build.proj index 4b07acf127..5185af990a 100644 --- a/build.proj +++ b/build.proj @@ -191,18 +191,10 @@ - - - - - - - - From 3081a51e51d9de943a97f285aba8bda4695a6342 Mon Sep 17 00:00:00 2001 From: Ben Russell Date: Mon, 2 Feb 2026 19:04:10 -0600 Subject: [PATCH 24/24] Remove BuildTests* targets --- BUILDGUIDE.md | 49 ----------- build.proj | 7 -- .../templates/jobs/ci-run-tests-job.yml | 10 --- .../templates/steps/build-all-tests-step.yml | 84 ------------------- .../build-and-run-tests-netcore-step.yml | 12 --- .../steps/build-and-run-tests-netfx-step.yml | 12 --- src/Microsoft.Data.SqlClient.sln | 1 - 7 files changed, 175 deletions(-) delete mode 100644 eng/pipelines/common/templates/steps/build-all-tests-step.yml diff --git a/BUILDGUIDE.md b/BUILDGUIDE.md index 5867ddcbfb..993de2f467 100644 --- a/BUILDGUIDE.md +++ b/BUILDGUIDE.md @@ -35,8 +35,6 @@ The following build targets are defined in `build.proj`: |`BuildNetCore`|Builds the .NET driver for all target frameworks.| |`BuildNetCoreAllOS`|Builds the .NET driver for all target frameworks and operating systems.| |`BuildNetFx`|Builds the .NET Framework driver for all target frameworks.| -|`BuildTestsNetCore`|Builds tests for the .NET driver.| -|`BuildTestsNetFx`|Builds tests for the .NET Framework driver.| |`Clean`|Cleans all generated files.| |`Restore`|Restores NuGet packages.| |`RunTests`|Runs the unit, functional, and manual tests for the .NET Framework and .NET drivers| @@ -65,32 +63,24 @@ build: Using the default configuration and running all tests: ```bash -msbuild -t:BuildTestsNetFx -p:TF=net462 -msbuild -t:BuildTestsNetCore msbuild -t:RunTests ``` Using the Release configuration: ```bash -msbuild -t:BuildTestsNetFx -p:TF=net462 -p:Configuration=Release -msbuild -t:BuildTestsNetCore -p:Configuration=Release msbuild -t:RunTests -p:Configuration=Release ``` Running only the unit tests: ```bash -msbuild -t:BuildTestsNetFx -p:TF=net462 -msbuild -t:BuildTestsNetCore msbuild -t:RunUnitTests ``` Using a specific .NET runtime to run tests: ```bash -msbuild -t:BuildTestsNetFx -p:TF=net462 -msbuild -t:BuildTestsNetCore msbuild -t:RunTests -p:DotnetPath=C:\net8-win-x86\ ``` @@ -238,7 +228,6 @@ dotnet build -t:BuildAll -p:ReferenceType=Package dotnet build -t:BuildAKVNetCore -p:ReferenceType=Package dotnet build -t:GenerateMdsPackage dotnet build -t:GenerateAkvPackage -dotnet build -t:BuildTestsNetCore -p:ReferenceType=Package ``` The above will build the MDS and AKV components, place their NuGet packages into @@ -248,30 +237,6 @@ 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 ReferenceType - -For .NET: - -```bash -# Project is the default reference type. The below commands are equivalent: -msbuild -t:BuildTestsNetCore -msbuild -t:BuildTestsNetCore -p:ReferenceType=Project - -# Package reference type: -msbuild -t:BuildTestsNetCore -p:ReferenceType=Package -``` - -For .NET Framework: - -```bash -# Project is the default reference type. The below commands are equivalent: -msbuild -t:BuildTestsNetFx -p:TF=net462 -msbuild -t:BuildTestsNetFx -p:TF=net462 -p:ReferenceType=Project - -# Package reference type: -msbuild -t:BuildTestsNetFx -p:TF=net462 -p:ReferenceType=Package -``` - ### Running Tests with Reference Type Provide property to `dotnet test` commands for testing desired reference type. @@ -284,20 +249,6 @@ dotnet test -p:ReferenceType=Project ... Tests can be built and run with custom Target Frameworks. See the below examples. -### Building Tests with custom target framework - -```bash -# Build the tests for custom .NET Framework target -msbuild -t:BuildTestsNetFx -p:TF=net462 -``` - -```bash -# Build the tests for custom .NET target -msbuild -t:BuildTestsNetCore -p:TF=net8.0 -``` - -### Running Tests with custom target framework (traditional) - ```bash # Run tests with custom .NET Framework target dotnet test -p:TargetNetFxVersion=net462 ... diff --git a/build.proj b/build.proj index 5185af990a..fc6717d67d 100644 --- a/build.proj +++ b/build.proj @@ -90,13 +90,6 @@ - - - - - - - $(CommonProperties) diff --git a/eng/pipelines/common/templates/jobs/ci-run-tests-job.yml b/eng/pipelines/common/templates/jobs/ci-run-tests-job.yml index 02cc6d58de..64c252773e 100644 --- a/eng/pipelines/common/templates/jobs/ci-run-tests-job.yml +++ b/eng/pipelines/common/templates/jobs/ci-run-tests-job.yml @@ -265,16 +265,6 @@ jobs: ${{ if parameters.configProperties.FileStreamDirectory }}: fileStreamDirectory: ${{ parameters.configProperties.FileStreamDirectory }} - - template: /eng/pipelines/common/templates/steps/build-all-tests-step.yml@self # build tests - parameters: - targetFramework: ${{ parameters.targetFramework }} - buildConfiguration: ${{ parameters.buildConfiguration }} - referenceType: ${{ parameters.referenceType }} - testSet: ${{ parameters.testSet }} - mdsPackageVersion: ${{ parameters.mdsPackageVersion }} - ${{ if ne(parameters.operatingSystem, 'Windows') }}: - OSGroup: Unix - - ${{ if eq(parameters.enableX64Test, true) }}: # run native tests - template: /eng/pipelines/common/templates/steps/run-all-tests-step.yml@self # run tests parameters: diff --git a/eng/pipelines/common/templates/steps/build-all-tests-step.yml b/eng/pipelines/common/templates/steps/build-all-tests-step.yml deleted file mode 100644 index c8a090c3ff..0000000000 --- a/eng/pipelines/common/templates/steps/build-all-tests-step.yml +++ /dev/null @@ -1,84 +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. # -################################################################################# -parameters: - - - name: buildConfiguration - type: string - values: - - Debug - - Release - - - name: mdsPackageVersion - type: string - - - name: osGroup - type: string - default: '' - - - name: platform - type: string - default: $(Platform) - - - name: referenceType - type: string - values: - - Project - - Package - - - name: targetFramework - type: string - - - name: testSet - type: string - -steps: -- ${{ if contains(parameters.targetFramework, 'net4') }}: # .NET Framework - - task: MSBuild@1 - displayName: 'Build Tests NetFx' - inputs: - solution: build.proj - platform: '${{ parameters.platform }}' - configuration: '${{ parameters.buildConfiguration }}' - msbuildArguments: >- - -t:BuildTestsNetFx - -p:TF=${{ parameters.targetFramework }} - -p:TestSet=${{ parameters.testSet }} - -p:ReferenceType=${{ parameters.referenceType }} - -p:MdsPackageVersion=${{ parameters.mdsPackageVersion }} -- ${{elseif eq(parameters.osGroup, '')}}: # .NET on Windows - - task: MSBuild@1 - displayName: 'Build Tests NetCore [Win]' - inputs: - solution: build.proj - platform: '${{ parameters.platform }}' - configuration: '${{ parameters.buildConfiguration }}' - msbuildArguments: >- - -t:BuildTestsNetCore - -p:TF=${{ parameters.targetFramework }} - -p:TestSet=${{ parameters.testSet }} - -p:ReferenceType=${{ parameters.referenceType }} - -p:MdsPackageVersion=${{ parameters.mdsPackageVersion }} - condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT')) - -- ${{ else }}: # .NET on Unix - - task: DotNetCoreCLI@2 - displayName: 'Build Tests NetCore [Non-Win]' - inputs: - command: custom - projects: build.proj - custom: msbuild - arguments: >- - -t:BuildTestsNetCore - -p:TF=${{ parameters.targetFramework }} - -p:TestSet=${{ parameters.testSet }} - -p:ReferenceType=${{ parameters.referenceType }} - -p:MdsPackageVersion=${{ parameters.mdsPackageVersion }} - -p:OSGroup=${{ parameters.osGroup }} - -p:platform=${{ parameters.platform }} - -p:Configuration=${{ parameters.buildConfiguration }} - verbosityRestore: Detailed - verbosityPack: Detailed - condition: and(succeeded(), ne(variables['Agent.OS'], 'Windows_NT')) 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 index 37a0cf87f6..956cfdc28b 100644 --- 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 @@ -52,18 +52,6 @@ steps: -p:ReferenceType=${{ parameters.referenceType }} -p:MdsPackageVersion=${{ parameters.mdsPackageVersion }} -- 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:MdsPackageVersion=${{ parameters.mdsPackageVersion }} - -p:Configuration=${{ parameters.buildConfiguration }} - # Don't run unit tests using package reference. Unit tests are only run using project reference. - task: DotNetCoreCLI@2 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 index ba1d247fee..443ca99687 100644 --- 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 @@ -52,18 +52,6 @@ steps: -p:ReferenceType=${{ parameters.referenceType }} -p:MdsPackageVersion=${{ parameters.mdsPackageVersion }} -- task: MSBuild@1 - displayName: 'MSBuild Build Tests for ${{parameters.TargetNetFxVersion }}' - inputs: - solution: build.proj - msbuildArguments: >- - -t:BuildTestsNetFx - -p:ReferenceType=${{ parameters.referenceType }} - -p:MdsPackageVersion=${{ parameters.mdsPackageVersion }} - -p:TargetNetFxVersion=${{ parameters.TargetNetFxVersion }} - -p:Configuration=${{ parameters.buildConfiguration }} - -p:Platform=${{ parameters.platform }} - # Don't run unit tests using package reference. Unit tests are only run using project reference. - task: DotNetCoreCLI@2 diff --git a/src/Microsoft.Data.SqlClient.sln b/src/Microsoft.Data.SqlClient.sln index db17cec85d..ac7bc0277e 100644 --- a/src/Microsoft.Data.SqlClient.sln +++ b/src/Microsoft.Data.SqlClient.sln @@ -249,7 +249,6 @@ EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "steps", "steps", "{EABE3A3E-D505-418A-B1B8-1B0AC4872F3D}" ProjectSection(SolutionItems) = preProject ..\eng\pipelines\common\templates\steps\build-all-configurations-signed-dlls-step.yml = ..\eng\pipelines\common\templates\steps\build-all-configurations-signed-dlls-step.yml - ..\eng\pipelines\common\templates\steps\build-all-tests-step.yml = ..\eng\pipelines\common\templates\steps\build-all-tests-step.yml ..\eng\pipelines\common\templates\steps\build-and-run-tests-netcore-step.yml = ..\eng\pipelines\common\templates\steps\build-and-run-tests-netcore-step.yml ..\eng\pipelines\common\templates\steps\build-and-run-tests-netfx-step.yml = ..\eng\pipelines\common\templates\steps\build-and-run-tests-netfx-step.yml ..\eng\pipelines\common\templates\steps\ci-prebuild-step.yml = ..\eng\pipelines\common\templates\steps\ci-prebuild-step.yml