From 3609866e3e44e68217bc5909ef441089f93ab784 Mon Sep 17 00:00:00 2001 From: Paul Medynski <31868385+paulmedynski@users.noreply.github.com> Date: Thu, 21 May 2026 07:38:36 -0300 Subject: [PATCH 1/7] Add BuildAll target, CodeQL update, and ref csproj cleanup --- .github/workflows/codeql.yml | 2 +- build.proj | 197 +++++++++++++++++++++++++++++------ 2 files changed, 168 insertions(+), 31 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 45890dfdf4..dc237459ee 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -99,7 +99,7 @@ jobs: - name: Run manual build steps if: matrix.build-mode == 'manual' shell: bash - run: dotnet build src/Microsoft.Data.SqlClient.slnx + run: dotnet build build.proj -t:BuildAll - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v4 diff --git a/build.proj b/build.proj index 4ff29a08df..30fe99e3bb 100644 --- a/build.proj +++ b/build.proj @@ -1,6 +1,5 @@ - - + @@ -246,7 +245,7 @@ + + + @@ -383,16 +385,18 @@ @@ -441,7 +445,8 @@ $([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " ")) - + + @@ -471,7 +476,8 @@ $([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " ")) - + + @@ -500,7 +506,8 @@ $([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " ")) - + + @@ -531,7 +538,8 @@ $([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " ")) - + + @@ -561,7 +569,8 @@ $([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " ")) - + + @@ -607,7 +616,8 @@ $([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " ")) - + + @@ -653,7 +663,8 @@ $([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " ")) - + + @@ -698,7 +709,8 @@ $([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " ")) - + + @@ -726,7 +738,8 @@ $([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " ")) - + + @@ -765,7 +778,8 @@ $([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " ")) - + + @@ -794,7 +808,8 @@ $([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " ")) - + + @@ -843,7 +858,8 @@ $([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " ")) - + + @@ -869,7 +885,8 @@ $([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " ")) - + + @@ -908,7 +925,8 @@ $([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " ")) - + + @@ -945,7 +963,8 @@ $([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " ")) - + + @@ -971,7 +990,8 @@ $([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " ")) - + + @@ -1013,7 +1033,8 @@ $([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " ")) - + + @@ -1042,7 +1063,8 @@ $([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " ")) - + + @@ -1064,7 +1086,8 @@ $([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " ")) - + + @@ -1104,7 +1127,8 @@ $([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " ")) - + + @@ -1126,7 +1150,8 @@ $([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " ")) - + + @@ -1140,4 +1165,116 @@ DestinationFolder="$(PackagesDir)" SkipUnchangedFiles="true" /> + + + + + + + <_OsList>Windows_NT;Unix + + + <_OsValues Include="$(_OsList)" /> + + + + + <_DotnetArguments> + -p:Configuration=$(Configuration) + + + $(BuildNumberArgument) + $(BuildSuffixArgument) + + + $(ReferenceTypeArgument) + $(PackageVersionAbstractionsArgument) + $(PackageVersionAkvProviderArgument) + $(PackageVersionAzureArgument) + $(PackageVersionLoggingArgument) + $(PackageVersionSqlClientArgument) + $(PackageVersionSqlServerArgument) + + + <_DotnetArguments>$([System.Text.RegularExpressions.Regex]::Replace($(_DotnetArguments), "\s+", " ")) + + + + + $(RepoRoot)src/Microsoft.Data.SqlClient.Extensions/Abstractions/test/Abstractions.Test.csproj + $(RepoRoot)src/Microsoft.Data.SqlClient/tests/UnitTests/Microsoft.Data.SqlClient.UnitTests.csproj + $(RepoRoot)src/Microsoft.Data.SqlClient/tests/FunctionalTests/Microsoft.Data.SqlClient.FunctionalTests.csproj + $(RepoRoot)src/Microsoft.Data.SqlClient/tests/ManualTests/Microsoft.Data.SqlClient.ManualTests.csproj + $(RepoRoot)src/Microsoft.Data.SqlClient/tests/PerformanceTests/Microsoft.Data.SqlClient.PerformanceTests.csproj + $(RepoRoot)src/Microsoft.Data.SqlClient/tests/StressTests/SqlClient.Stress.Runner/SqlClient.Stress.Runner.csproj + $(RepoRoot)src/Microsoft.Data.SqlClient.Extensions/Azure/test/Azure.Test.csproj + + $(RepoRoot)doc/samples/Microsoft.Data.SqlClient.Samples.csproj + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From c86538cd79f816b931003390895dd788b4ab12bd Mon Sep 17 00:00:00 2001 From: Paul Medynski <31868385+paulmedynski@users.noreply.github.com> Date: Thu, 21 May 2026 16:45:24 -0300 Subject: [PATCH 2/7] Replace ancillary BuildTests with first-class per-project targets --- build.proj | 344 ++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 259 insertions(+), 85 deletions(-) diff --git a/build.proj b/build.proj index 30fe99e3bb..8cf9d843d6 100644 --- a/build.proj +++ b/build.proj @@ -1167,114 +1167,288 @@ - + - - <_OsList>Windows_NT;Unix + $(SqlClientSrcRoot)tests/PerformanceTests/Microsoft.Data.SqlClient.PerformanceTests.csproj + $(SqlClientSrcRoot)tests/StressTests/SqlClient.Stress.Runner/SqlClient.Stress.Runner.csproj + $(RepoRoot)doc/samples/Microsoft.Data.SqlClient.Samples.csproj - - <_OsValues Include="$(_OsList)" /> - - - - <_DotnetArguments> - -p:Configuration=$(Configuration) - - - $(BuildNumberArgument) - $(BuildSuffixArgument) - - - $(ReferenceTypeArgument) - $(PackageVersionAbstractionsArgument) - $(PackageVersionAkvProviderArgument) - $(PackageVersionAzureArgument) - $(PackageVersionLoggingArgument) - $(PackageVersionSqlClientArgument) - $(PackageVersionSqlServerArgument) - - - <_DotnetArguments>$([System.Text.RegularExpressions.Regex]::Replace($(_DotnetArguments), "\s+", " ")) - + + - + + + + "$(DotnetPath)dotnet" build "$(AbstractionsTestProjectPath)" + -p:Configuration=$(Configuration) + + $([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " ")) + + + + + - These aren't all of the possible projects - only the top-level ones that, in turn, will - transitively build all ancillary projects. - --> - - $(RepoRoot)src/Microsoft.Data.SqlClient.Extensions/Abstractions/test/Abstractions.Test.csproj - $(RepoRoot)src/Microsoft.Data.SqlClient/tests/UnitTests/Microsoft.Data.SqlClient.UnitTests.csproj - $(RepoRoot)src/Microsoft.Data.SqlClient/tests/FunctionalTests/Microsoft.Data.SqlClient.FunctionalTests.csproj - $(RepoRoot)src/Microsoft.Data.SqlClient/tests/ManualTests/Microsoft.Data.SqlClient.ManualTests.csproj - $(RepoRoot)src/Microsoft.Data.SqlClient/tests/PerformanceTests/Microsoft.Data.SqlClient.PerformanceTests.csproj - $(RepoRoot)src/Microsoft.Data.SqlClient/tests/StressTests/SqlClient.Stress.Runner/SqlClient.Stress.Runner.csproj - $(RepoRoot)src/Microsoft.Data.SqlClient.Extensions/Azure/test/Azure.Test.csproj - - $(RepoRoot)doc/samples/Microsoft.Data.SqlClient.Samples.csproj - + + - - + + + + "$(DotnetPath)dotnet" build "$(SqlClientUnitTestProjectPath)" + -p:Configuration=$(Configuration) + -p:TargetOs=Unix + + $([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " ")) + + + + + - + + + + "$(DotnetPath)dotnet" build "$(SqlClientUnitTestProjectPath)" + -p:Configuration=$(Configuration) + -p:TargetOs=Windows_NT + + $([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " ")) + + + + + - + + - - - - + + + + "$(DotnetPath)dotnet" build "$(SqlClientFunctionalTestProjectPath)" + -p:Configuration=$(Configuration) + -p:TargetOs=Unix - - - + + $(ReferenceTypeArgument) + $(PackageVersionAbstractionsArgument) + $(PackageVersionLoggingArgument) + $(PackageVersionSqlClientArgument) + + $([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " ")) + + + + + - - - - + + + + "$(DotnetPath)dotnet" build "$(SqlClientFunctionalTestProjectPath)" + -p:Configuration=$(Configuration) + -p:TargetOs=Windows_NT - - - - + + $(ReferenceTypeArgument) + $(PackageVersionAbstractionsArgument) + $(PackageVersionLoggingArgument) + $(PackageVersionSqlClientArgument) + + $([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " ")) + + + + + - - - - + + - - - - + + + + "$(DotnetPath)dotnet" build "$(SqlClientManualTestProjectPath)" + -p:Configuration=$(Configuration) + -p:TargetOs=Unix - - - - + + $(ReferenceTypeArgument) + $(PackageVersionAbstractionsArgument) + $(PackageVersionLoggingArgument) + $(PackageVersionSqlClientArgument) + + $([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " ")) + + + + + - + + + + "$(DotnetPath)dotnet" build "$(SqlClientManualTestProjectPath)" + -p:Configuration=$(Configuration) + -p:TargetOs=Windows_NT + + $(ReferenceTypeArgument) + $(PackageVersionAbstractionsArgument) + $(PackageVersionLoggingArgument) + $(PackageVersionSqlClientArgument) + + $([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " ")) + + + + + + + + + + + "$(DotnetPath)dotnet" build "$(SqlClientPerformanceTestProjectPath)" + -p:Configuration=$(Configuration) + -p:TargetOs=Unix + + + $(ReferenceTypeArgument) + $(PackageVersionAbstractionsArgument) + $(PackageVersionLoggingArgument) + $(PackageVersionSqlClientArgument) + + $([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " ")) + + + + + + + + + + "$(DotnetPath)dotnet" build "$(SqlClientPerformanceTestProjectPath)" + -p:Configuration=$(Configuration) + -p:TargetOs=Windows_NT + + + $(ReferenceTypeArgument) + $(PackageVersionAbstractionsArgument) + $(PackageVersionLoggingArgument) + $(PackageVersionSqlClientArgument) + + $([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " ")) + + + + + + + + + + + + + "$(DotnetPath)dotnet" build "$(SqlClientStressTestProjectPath)" + -p:Configuration=$(Configuration) + -p:TargetOs=Unix + + + $(ReferenceTypeArgument) + $(PackageVersionAbstractionsArgument) + $(PackageVersionLoggingArgument) + $(PackageVersionSqlClientArgument) + + $([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " ")) + + + + + + + + + + "$(DotnetPath)dotnet" build "$(SqlClientStressTestProjectPath)" + -p:Configuration=$(Configuration) + -p:TargetOs=Windows_NT + + + $(ReferenceTypeArgument) + $(PackageVersionAbstractionsArgument) + $(PackageVersionLoggingArgument) + $(PackageVersionSqlClientArgument) + + $([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " ")) + + + + + + + + + + + + + "$(DotnetPath)dotnet" build "$(AzureTestProjectPath)" + -p:Configuration=$(Configuration) + -p:TargetOs=Unix + + + $(ReferenceTypeArgument) + $(PackageVersionSqlClientArgument) + + $([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " ")) + + + + + + + + + + "$(DotnetPath)dotnet" build "$(AzureTestProjectPath)" + -p:Configuration=$(Configuration) + -p:TargetOs=Windows_NT + + + $(ReferenceTypeArgument) + $(PackageVersionSqlClientArgument) + + $([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " ")) + + + + + + + + + + + + "$(DotnetPath)dotnet" build "$(SamplesProjectPath)" + -p:Configuration=$(Configuration) + + $([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " ")) + - - + + From 357e48c0ee741d4a5fb5335858917ba3052bd24b Mon Sep 17 00:00:00 2001 From: Paul Medynski <31868385+paulmedynski@users.noreply.github.com> Date: Wed, 10 Jun 2026 13:50:35 -0300 Subject: [PATCH 3/7] Use TargetOs instead of OS in test projects for TFM selection Test projects previously used the built-in $(OS) property to gate net462 inclusion. This meant passing -p:TargetOs=Windows_NT from build.proj had no effect on test TFM selection. Migrate all test csproj files and Directory.Build.props to define TargetOs (defaulting to $(OS)) and condition on it, matching the pattern already used by the driver project. This allows BuildAll to build all TFMs regardless of host OS. --- .../Azure/test/Azure.Test.csproj | 10 +++++----- .../Microsoft.Data.SqlClient.TestCommon.csproj | 10 +++++----- .../CustomRetryLogicProvider.csproj | 10 +++++----- ...Microsoft.Data.SqlClient.FunctionalTests.csproj | 10 +++++----- .../Microsoft.Data.SqlClient.ManualTests.csproj | 10 +++++----- .../tests/StressTests/Directory.Build.props | 7 +++++-- .../tests/TestUdts/Address/Address.csproj | 10 +++++----- .../tests/TestUdts/Circle/Circle.csproj | 10 +++++----- .../tests/TestUdts/Shapes/Shapes.csproj | 10 +++++----- .../tests/TestUdts/Utf8String/Utf8String.csproj | 10 +++++----- .../Microsoft.Data.SqlClient.UnitTests.csproj | 14 +++++++------- .../tools/TDS/TDS.EndPoint/TDS.EndPoint.csproj | 5 +++-- 12 files changed, 60 insertions(+), 56 deletions(-) diff --git a/src/Microsoft.Data.SqlClient.Extensions/Azure/test/Azure.Test.csproj b/src/Microsoft.Data.SqlClient.Extensions/Azure/test/Azure.Test.csproj index 1c020c2ae4..5d6780414b 100644 --- a/src/Microsoft.Data.SqlClient.Extensions/Azure/test/Azure.Test.csproj +++ b/src/Microsoft.Data.SqlClient.Extensions/Azure/test/Azure.Test.csproj @@ -12,11 +12,11 @@ net8.0;net9.0;net10.0 - - $(TargetFrameworks);net462 + + $(OS) + + + $(TargetFrameworks);net462 diff --git a/src/Microsoft.Data.SqlClient/tests/Common/Microsoft.Data.SqlClient.TestCommon.csproj b/src/Microsoft.Data.SqlClient/tests/Common/Microsoft.Data.SqlClient.TestCommon.csproj index 67c5250748..de44a0c64b 100644 --- a/src/Microsoft.Data.SqlClient/tests/Common/Microsoft.Data.SqlClient.TestCommon.csproj +++ b/src/Microsoft.Data.SqlClient/tests/Common/Microsoft.Data.SqlClient.TestCommon.csproj @@ -25,11 +25,11 @@ net8.0;net9.0;net10.0 - - $(TargetFrameworks);net462 + + $(OS) + + + $(TargetFrameworks);net462 diff --git a/src/Microsoft.Data.SqlClient/tests/CustomConfigurableRetryLogic/CustomRetryLogicProvider.csproj b/src/Microsoft.Data.SqlClient/tests/CustomConfigurableRetryLogic/CustomRetryLogicProvider.csproj index bdbdeafe53..ca037a50bf 100644 --- a/src/Microsoft.Data.SqlClient/tests/CustomConfigurableRetryLogic/CustomRetryLogicProvider.csproj +++ b/src/Microsoft.Data.SqlClient/tests/CustomConfigurableRetryLogic/CustomRetryLogicProvider.csproj @@ -8,11 +8,11 @@ net8.0;net9.0;net10.0 - - $(TargetFrameworks);net462 + + $(OS) + + + $(TargetFrameworks);net462 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 13673697db..e1df71835f 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 @@ -10,11 +10,11 @@ net8.0;net9.0;net10.0 - - $(TargetFrameworks);net462 + + $(OS) + + + $(TargetFrameworks);net462 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 ce159f7821..6a4beed2dc 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 @@ -10,11 +10,11 @@ net8.0;net9.0;net10.0 - - $(TargetFrameworks);net462 + + $(OS) + + + $(TargetFrameworks);net462 diff --git a/src/Microsoft.Data.SqlClient/tests/StressTests/Directory.Build.props b/src/Microsoft.Data.SqlClient/tests/StressTests/Directory.Build.props index 910f8d53a0..93c1f10d93 100644 --- a/src/Microsoft.Data.SqlClient/tests/StressTests/Directory.Build.props +++ b/src/Microsoft.Data.SqlClient/tests/StressTests/Directory.Build.props @@ -13,8 +13,11 @@ net8.0;net9.0;net10.0 - - $(TargetFrameworks);net462 + + $(OS) + + + $(TargetFrameworks);net462 - $(TargetFrameworks);net462 + + $(OS) + + + $(TargetFrameworks);net462 diff --git a/src/Microsoft.Data.SqlClient/tests/TestUdts/Circle/Circle.csproj b/src/Microsoft.Data.SqlClient/tests/TestUdts/Circle/Circle.csproj index db53171c6e..e19c8b40a5 100644 --- a/src/Microsoft.Data.SqlClient/tests/TestUdts/Circle/Circle.csproj +++ b/src/Microsoft.Data.SqlClient/tests/TestUdts/Circle/Circle.csproj @@ -8,11 +8,11 @@ net8.0;net9.0;net10.0 - - $(TargetFrameworks);net462 + + $(OS) + + + $(TargetFrameworks);net462 diff --git a/src/Microsoft.Data.SqlClient/tests/TestUdts/Shapes/Shapes.csproj b/src/Microsoft.Data.SqlClient/tests/TestUdts/Shapes/Shapes.csproj index e115355bfe..d8c2d66253 100644 --- a/src/Microsoft.Data.SqlClient/tests/TestUdts/Shapes/Shapes.csproj +++ b/src/Microsoft.Data.SqlClient/tests/TestUdts/Shapes/Shapes.csproj @@ -8,11 +8,11 @@ net8.0;net9.0;net10.0 - - $(TargetFrameworks);net462 + + $(OS) + + + $(TargetFrameworks);net462 diff --git a/src/Microsoft.Data.SqlClient/tests/TestUdts/Utf8String/Utf8String.csproj b/src/Microsoft.Data.SqlClient/tests/TestUdts/Utf8String/Utf8String.csproj index 02e0193f82..cc41b9fb47 100644 --- a/src/Microsoft.Data.SqlClient/tests/TestUdts/Utf8String/Utf8String.csproj +++ b/src/Microsoft.Data.SqlClient/tests/TestUdts/Utf8String/Utf8String.csproj @@ -8,11 +8,11 @@ net8.0;net9.0;net10.0 - - $(TargetFrameworks);net462 + + $(OS) + + + $(TargetFrameworks);net462 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 e09e49c967..7356c28f77 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 @@ -11,11 +11,11 @@ net8.0;net9.0;net10.0 - - $(TargetFrameworks);net462 + + $(OS) + + + $(TargetFrameworks);net462 @@ -61,8 +61,8 @@ as explained above. --> - <_SqlClientRid Condition="'$(OS)' != 'Windows_NT'">unix - <_SqlClientRid Condition="'$(OS)' == 'Windows_NT'">win + <_SqlClientRid Condition="'$(TargetOs)' != 'Windows_NT'">unix + <_SqlClientRid Condition="'$(TargetOs)' == 'Windows_NT'">win <_SqlClientPackageTfm Condition="'$(TargetFramework)' == 'net8.0'">net8.0 <_SqlClientPackageTfm Condition="'$(TargetFramework)' == 'net462'">net462 diff --git a/src/Microsoft.Data.SqlClient/tests/tools/TDS/TDS.EndPoint/TDS.EndPoint.csproj b/src/Microsoft.Data.SqlClient/tests/tools/TDS/TDS.EndPoint/TDS.EndPoint.csproj index c9dce97ddb..aaede5846b 100644 --- a/src/Microsoft.Data.SqlClient/tests/tools/TDS/TDS.EndPoint/TDS.EndPoint.csproj +++ b/src/Microsoft.Data.SqlClient/tests/tools/TDS/TDS.EndPoint/TDS.EndPoint.csproj @@ -3,6 +3,7 @@ Microsoft.SqlServer.TDS.EndPoint Microsoft.SqlServer.TDS.EndPoint netstandard2.0 + $(OS) @@ -48,13 +49,13 @@ - + - + From f8da78503a322427d3a6c34cf47e224f09224530 Mon Sep 17 00:00:00 2001 From: Paul Medynski <31868385+paulmedynski@users.noreply.github.com> Date: Tue, 16 Jun 2026 06:49:20 -0300 Subject: [PATCH 4/7] build: Forward ReferenceType/PackageVersion args to unit and manual test build targets BuildSqlClientTestsUnitUnix/Windows now forward $(ReferenceTypeArgument), $(PackageVersionSqlClientArgument), and $(PackageVersionSqlServerArgument) to align with the TestSqlClientUnit target. BuildSqlClientTestsManualUnix/Windows now also forward $(PackageVersionSqlServerArgument) for consistent Package-mode restore. Addresses PR #4290 review feedback. --- build.proj | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/build.proj b/build.proj index 8cf9d843d6..7c17a5e9cf 100644 --- a/build.proj +++ b/build.proj @@ -1201,6 +1201,11 @@ "$(DotnetPath)dotnet" build "$(SqlClientUnitTestProjectPath)" -p:Configuration=$(Configuration) -p:TargetOs=Unix + + + $(ReferenceTypeArgument) + $(PackageVersionSqlClientArgument) + $(PackageVersionSqlServerArgument) $([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " ")) @@ -1215,6 +1220,11 @@ "$(DotnetPath)dotnet" build "$(SqlClientUnitTestProjectPath)" -p:Configuration=$(Configuration) -p:TargetOs=Windows_NT + + + $(ReferenceTypeArgument) + $(PackageVersionSqlClientArgument) + $(PackageVersionSqlServerArgument) $([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " ")) @@ -1281,6 +1291,7 @@ $(PackageVersionAbstractionsArgument) $(PackageVersionLoggingArgument) $(PackageVersionSqlClientArgument) + $(PackageVersionSqlServerArgument) $([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " ")) @@ -1301,6 +1312,7 @@ $(PackageVersionAbstractionsArgument) $(PackageVersionLoggingArgument) $(PackageVersionSqlClientArgument) + $(PackageVersionSqlServerArgument) $([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " ")) From be32a01d2c6ab019d6a85d58d6a51b3fea845951 Mon Sep 17 00:00:00 2001 From: Paul Medynski <31868385+paulmedynski@users.noreply.github.com> Date: Tue, 16 Jun 2026 07:06:44 -0300 Subject: [PATCH 5/7] build: Forward TestSigningKeyPath to unit test build targets BuildSqlClientTestsUnitUnix/Windows now forward $(TestSigningKeyPathArgument) so that signed-driver builds pass the correct InternalsVisibleTo key to the unit test project, matching the TestSqlClientUnit target. Addresses PR #4290 review feedback. --- build.proj | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build.proj b/build.proj index 7c17a5e9cf..8335526024 100644 --- a/build.proj +++ b/build.proj @@ -1204,6 +1204,7 @@ $(ReferenceTypeArgument) + $(TestSigningKeyPathArgument) $(PackageVersionSqlClientArgument) $(PackageVersionSqlServerArgument) @@ -1223,6 +1224,7 @@ $(ReferenceTypeArgument) + $(TestSigningKeyPathArgument) $(PackageVersionSqlClientArgument) $(PackageVersionSqlServerArgument) From 48bbca621f6163e1bdb2070ec5c89c2c9e170da2 Mon Sep 17 00:00:00 2001 From: Paul Medynski <31868385+paulmedynski@users.noreply.github.com> Date: Tue, 16 Jun 2026 07:54:38 -0300 Subject: [PATCH 6/7] Updated BUILDGUIDE with the new top-level targets. --- BUILDGUIDE.md | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/BUILDGUIDE.md b/BUILDGUIDE.md index 073f6afc68..e94ad5641f 100644 --- a/BUILDGUIDE.md +++ b/BUILDGUIDE.md @@ -72,19 +72,23 @@ it from the `dotnet build` command. The following build targets can be used to build the following projects. All targets will implicitly build any other projects they depend on. -| `` | Description | -|-----------------------------|---------------------------------------------------------------------------------| -| `Build` | Builds all projects for all platforms | -| `BuildAbstractions` | Builds Microsoft.Data.SqlClient.Extensions.Abstractions | -| `BuildAkvProvider` | Builds Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider | -| `BuildAzure` | Builds Microsoft.Data.SqlClient.Extensions.Azure | -| `BuildLogging` | Builds Microsoft.Data.SqlClient.Internal.Logging | -| `BuildSqlClient` | Builds all variants of Microsoft.Data.SqlClient, for all platforms | -| `BuildSqlClientRef` | Builds the reference assemblies for Microsoft.Data.SqlClient | -| `BuildSqlClientUnsupported` | Builds the "unsupported platform" assemblies for Microsoft.Data.SqlClient | -| `BuildSqlClientUnix` | Builds the Unix-specific implementation binaries of Microsoft.Data.SqlClient | -| `BuildSqlClientWindows` | Builds the Windows-specific implementation binaries of Microsoft.Data.SqlClient | -| `BuildSqlServer` | Builds Microsoft.SqlServer.Server | +| `` | Description | +|-------------------------------|---------------------------------------------------------------------------------| +| `Build` | Builds all projects for all platforms | +| `BuildAbstractions` | Builds Microsoft.Data.SqlClient.Extensions.Abstractions | +| `BuildAkvProvider` | Builds Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider | +| `BuildAll` | Builds all projects, tests, and samples for all supported OS combinations | +| `BuildAzure` | Builds Microsoft.Data.SqlClient.Extensions.Azure | +| `BuildLogging` | Builds Microsoft.Data.SqlClient.Internal.Logging | +| `BuildSamples` | Builds the sample projects under `doc/samples/` | +| `BuildSqlClient` | Builds all variants of Microsoft.Data.SqlClient, for all platforms | +| `BuildSqlClientNotSupported` | Builds the "unsupported platform" assemblies for Microsoft.Data.SqlClient | +| `BuildSqlClientRef` | Builds the reference assemblies for Microsoft.Data.SqlClient | +| `BuildSqlClientUnix` | Builds the Unix-specific implementation binaries of Microsoft.Data.SqlClient | +| `BuildSqlClientWindows` | Builds the Windows-specific implementation binaries of Microsoft.Data.SqlClient | +| `BuildSqlServer` | Builds Microsoft.SqlServer.Server | +| `BuildTests` | Builds all test projects for all supported OS combinations | +| `Clean` | Removes build and test output directories | A selection of parameters for build targets in `build.proj` can be found below: @@ -139,6 +143,7 @@ dotnet build -t: [optional_parameters] | `` | Description | |----------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------| | `Test` | Runs all tests in the repository for all platforms supported by the host OS. _This will take a considerable amount of time and is not recommended_. | +| `TestAbstractions` | Runs all tests for Microsoft.Data.SqlClient.Extensions.Abstractions | | `TestAzure` | Runs all tests for Microsoft.Data.SqlClient.Extensions.Azure | | `TestSqlClient` | Runs all tests for Microsoft.Data.SqlClient. | | `TestSqlClientFunctional` | Runs the "functional" test project for Microsoft.Data.SqlClient. These are a mix of unit and integration tests against live servers. | From 5f4cf612821e57f29be187536e7e631c71d376d0 Mon Sep 17 00:00:00 2001 From: Paul Medynski <31868385+paulmedynski@users.noreply.github.com> Date: Tue, 16 Jun 2026 08:35:56 -0300 Subject: [PATCH 7/7] Clarified that Build is only for driver projects. --- BUILDGUIDE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BUILDGUIDE.md b/BUILDGUIDE.md index e94ad5641f..b4a486acb4 100644 --- a/BUILDGUIDE.md +++ b/BUILDGUIDE.md @@ -74,7 +74,7 @@ projects they depend on. | `` | Description | |-------------------------------|---------------------------------------------------------------------------------| -| `Build` | Builds all projects for all platforms | +| `Build` | Builds all driver projects for all platforms | | `BuildAbstractions` | Builds Microsoft.Data.SqlClient.Extensions.Abstractions | | `BuildAkvProvider` | Builds Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider | | `BuildAll` | Builds all projects, tests, and samples for all supported OS combinations |