From ff2cfe7986129119ec9620c1c1a9c1a2fd4d6c60 Mon Sep 17 00:00:00 2001 From: Ben Russell Date: Mon, 12 Jan 2026 18:23:22 -0600 Subject: [PATCH 1/6] Get project building under common project --- ...soft.Data.SqlClient.FunctionalTests.csproj | 148 ++++++++++-------- .../Microsoft.Data.SqlClient.UnitTests.csproj | 12 +- 2 files changed, 89 insertions(+), 71 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 7f6d8abd2c..01adf61fee 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 @@ -1,15 +1,14 @@  - false + FunctionalTests - netfx - netcoreapp - win - win-$(Platform) - $(ObjFolder)$(Configuration).$(Platform).$(AssemblyName) - $(BinFolder)$(Configuration).$(Platform).$(AssemblyName) + Microsoft.Data.SqlClient.FunctionalTests true + + + false + @@ -73,67 +72,11 @@ Always - - - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - - - - - - - - - - - - - - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - - + - - - Common - - - Address - - - TDS.Servers - - - TDS.EndPoint - - - TDS - - - - - - - - + PreserveNewest @@ -146,4 +89,79 @@ xunit.runner.json + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Microsoft.Data.SqlClient/tests/UnitTests/Microsoft.Data.SqlClient.UnitTests.csproj b/src/Microsoft.Data.SqlClient/tests/UnitTests/Microsoft.Data.SqlClient.UnitTests.csproj index 90dcc1a8af..c73feb4119 100644 --- a/src/Microsoft.Data.SqlClient/tests/UnitTests/Microsoft.Data.SqlClient.UnitTests.csproj +++ b/src/Microsoft.Data.SqlClient/tests/UnitTests/Microsoft.Data.SqlClient.UnitTests.csproj @@ -52,10 +52,10 @@ IncludeAssets="runtime; build; native; contentfiles; analyzers; buildtransitive" PrivateAssets="all" /> - - - + + + @@ -73,9 +73,9 @@ IncludeAssets="runtime; build; native; contentfiles; analyzers; buildtransitive" PrivateAssets="all" /> - - - + + + From f6aa20432d0dfca2721748e4be26f14771464643 Mon Sep 17 00:00:00 2001 From: Ben Russell Date: Mon, 12 Jan 2026 19:06:35 -0600 Subject: [PATCH 2/6] Cleanup the rest of the functional test project --- ...soft.Data.SqlClient.FunctionalTests.csproj | 114 +++++------------- .../FunctionalTests/SslOverTdsStreamTest.cs | 4 + 2 files changed, 31 insertions(+), 87 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 01adf61fee..3cdd360113 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 @@ -5,105 +5,41 @@ Microsoft.Data.SqlClient.FunctionalTests true - - - false - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Always - - - - - - + + - - PreserveNewest - %(Filename)%(Extension) - + + + + + - + + + + Always + + + PreserveNewest xunit.runner.json - - - - - - - - - + + + + + + + @@ -112,6 +48,8 @@ + @@ -141,6 +79,8 @@ + diff --git a/src/Microsoft.Data.SqlClient/tests/FunctionalTests/SslOverTdsStreamTest.cs b/src/Microsoft.Data.SqlClient/tests/FunctionalTests/SslOverTdsStreamTest.cs index 56cc653744..7ef3df9ca2 100644 --- a/src/Microsoft.Data.SqlClient/tests/FunctionalTests/SslOverTdsStreamTest.cs +++ b/src/Microsoft.Data.SqlClient/tests/FunctionalTests/SslOverTdsStreamTest.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.Diagnostics; using System.IO; @@ -359,3 +361,5 @@ public override ValueTask ReadAsync(Memory destination, CancellationT } } } + +#endif From d2939098b78442104137189ef938b8454b69c85e Mon Sep 17 00:00:00 2001 From: Ben Russell Date: Tue, 13 Jan 2026 15:52:13 -0600 Subject: [PATCH 3/6] Fix reflection issue in SslOverTdsStreamTest --- .../tests/FunctionalTests/SslOverTdsStreamTest.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Microsoft.Data.SqlClient/tests/FunctionalTests/SslOverTdsStreamTest.cs b/src/Microsoft.Data.SqlClient/tests/FunctionalTests/SslOverTdsStreamTest.cs index 7ef3df9ca2..410e518033 100644 --- a/src/Microsoft.Data.SqlClient/tests/FunctionalTests/SslOverTdsStreamTest.cs +++ b/src/Microsoft.Data.SqlClient/tests/FunctionalTests/SslOverTdsStreamTest.cs @@ -173,7 +173,7 @@ private static void InvokeFinishHandshake(Stream stream) private static Stream CreateSslOverTdsStream(Stream stream) { - Type type = typeof(SqlClientFactory).Assembly.GetType("Microsoft.Data.SqlClient.SNI.SslOverTdsStream"); + Type type = typeof(SqlClientFactory).Assembly.GetType("Microsoft.Data.SqlClient.ManagedSni.SslOverTdsStream"); ConstructorInfo ctor = type.GetConstructor(new Type[] { typeof(Stream) }); Stream instance = (Stream)ctor.Invoke(new object[] { stream }); return instance; From e2c8b5da77ccb4d7665e648e483eb432f6d6da89 Mon Sep 17 00:00:00 2001 From: Ben Russell Date: Tue, 13 Jan 2026 16:05:18 -0600 Subject: [PATCH 4/6] build.proj --- build.proj | 49 ++++++++----------------------------------------- 1 file changed, 8 insertions(+), 41 deletions(-) diff --git a/build.proj b/build.proj index 7d39fa93d3..698e5f9e54 100644 --- a/build.proj +++ b/build.proj @@ -70,13 +70,6 @@ - - - - - - - @@ -97,8 +90,8 @@ - - + + @@ -110,7 +103,6 @@ - @@ -119,7 +111,6 @@ - @@ -167,15 +158,6 @@ - - - - - - - - - @@ -185,15 +167,6 @@ - - - - - - - - - @@ -258,19 +231,16 @@ $(DotnetPath)dotnet test "@(FunctionalTestsProj)" - --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)" --logger:"trx;LogFilePrefix=Functional-Windows$(TargetGroup)-$(TestSet)" - $(TestCommand.Replace($([System.Environment]::NewLine), " ")) + + $([System.Text.RegularExpressions.Regex]::Replace($(TestCommand), "\s+", " ")) @@ -281,19 +251,16 @@ $(DotnetPath)dotnet test "@(FunctionalTestsProj)" - --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)" --logger:"trx;LogFilePrefix=Functional-Unixnetcoreapp-$(TestSet)" - $(TestCommand.Replace($([System.Environment]::NewLine), " ")) + + $([System.Text.RegularExpressions.Regex]::Replace($(TestCommand), "\s+", " ")) From 16f0e20967b806913c69cb25d10ef251cf8ab939 Mon Sep 17 00:00:00 2001 From: Ben Russell Date: Wed, 14 Jan 2026 13:36:47 -0600 Subject: [PATCH 5/6] Add TDS projects as dependencies for ManualTesting --- build.proj | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build.proj b/build.proj index 698e5f9e54..63c616c39f 100644 --- a/build.proj +++ b/build.proj @@ -80,6 +80,9 @@ + + + From e7396dc9077fa29c9fc46403de344f1fc53c6651 Mon Sep 17 00:00:00 2001 From: Ben Russell Date: Wed, 14 Jan 2026 14:13:48 -0600 Subject: [PATCH 6/6] AKV needs to be built in build tests target for non-windows pipeline runs --- build.proj | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/build.proj b/build.proj index 63c616c39f..d42e94b50c 100644 --- a/build.proj +++ b/build.proj @@ -93,8 +93,10 @@ - - + + + +