From 9f38b2e26457c0e1c653609ce3a65ac1f25e58a0 Mon Sep 17 00:00:00 2001 From: Ben Russell Date: Mon, 9 Feb 2026 13:17:06 -0600 Subject: [PATCH 01/12] Stubbing out additional targets for build2.proj --- build2.proj | 60 ++++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 52 insertions(+), 8 deletions(-) diff --git a/build2.proj b/build2.proj index 479d802f12..c91ed31d0b 100644 --- a/build2.proj +++ b/build2.proj @@ -11,13 +11,14 @@ - + - - + + + $(RepoRoot)src/Microsoft.Data.SqlClient/src/Microsoft.Data.SqlClient.csproj @@ -33,8 +34,8 @@ -p:Configuration=$(Configuration) -p:TargetOs=Unix - - $([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " ")) + + $([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " ")) @@ -48,10 +49,53 @@ -p:Configuration=$(Configuration) -p:TargetOs=Windows_NT - - $([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " ")) + + $([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " ")) - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $(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+", " ")) + + + + From 26e899ed3f814037cb3a664c0ebc46ae63da1080 Mon Sep 17 00:00:00 2001 From: Ben Russell Date: Mon, 9 Feb 2026 14:11:21 -0600 Subject: [PATCH 02/12] First attempt at a pack target --- build2.proj | 35 +++++++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/build2.proj b/build2.proj index c91ed31d0b..d4b7bf52a8 100644 --- a/build2.proj +++ b/build2.proj @@ -12,6 +12,13 @@ + + + + + + + @@ -20,7 +27,8 @@ - $(RepoRoot)src/Microsoft.Data.SqlClient/src/Microsoft.Data.SqlClient.csproj + $(RepoRoot)tools/specs/Microsoft.Data.SqlClient.nuspec + $(RepoRoot)src/Microsoft.Data.SqlClient/src/Microsoft.Data.SqlClient.csproj @@ -58,7 +66,30 @@ - + + + git rev-parse HEAD + + + + + + + + + + $(NugetPath)nuget pack $(MdsNuspecPath) + -OutputDirectory $ @TODO: + -Version $(MdsPackageVersion) + -Properties "COMMITID=$(CommitHash);Configuration=$(Configuration);" + -Symbols + -SymbolPackageFormat snupkg + + + $([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " ")) + + + From ae5a1a96011c278ac9e5a6efee6268b7c43e24d2 Mon Sep 17 00:00:00 2001 From: Ben Russell Date: Tue, 10 Feb 2026 14:20:07 -0600 Subject: [PATCH 03/12] Fix issue with target OS and target frameworks in common MDS build --- .../src/Microsoft.Data.SqlClient.csproj | 35 +++++++++---------- 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft.Data.SqlClient.csproj b/src/Microsoft.Data.SqlClient/src/Microsoft.Data.SqlClient.csproj index fb54bc02ef..87789ae3f5 100644 --- a/src/Microsoft.Data.SqlClient/src/Microsoft.Data.SqlClient.csproj +++ b/src/Microsoft.Data.SqlClient/src/Microsoft.Data.SqlClient.csproj @@ -28,29 +28,17 @@ - - - net462;net8.0;net9.0 - - - - - Windows_NT + + $(OS) - + + + + + @@ -62,6 +50,15 @@ $(DefineConstants);_WINDOWS + + + net8.0;net9.0 + + + + $(TargetFrameworks);net462 + + From e2ca90e8ede7d7ff6977dc11b6200ee36795137d Mon Sep 17 00:00:00 2001 From: Ben Russell Date: Tue, 10 Feb 2026 15:01:41 -0600 Subject: [PATCH 04/12] Some in flight changes to build2.proj. Coming back to this in a bit. --- build2.proj | 61 ++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 44 insertions(+), 17 deletions(-) diff --git a/build2.proj b/build2.proj index d4b7bf52a8..b801b9ccf9 100644 --- a/build2.proj +++ b/build2.proj @@ -2,22 +2,44 @@ - - - + Debug - - - - - - - - - - - + + + + + + + @@ -27,6 +49,7 @@ + $(RepoRoot)artifacts/Microsoft.Data.SqlClient/ $(RepoRoot)tools/specs/Microsoft.Data.SqlClient.nuspec $(RepoRoot)src/Microsoft.Data.SqlClient/src/Microsoft.Data.SqlClient.csproj @@ -66,6 +89,10 @@ + + + git rev-parse HEAD @@ -78,9 +105,9 @@ - $(NugetPath)nuget pack $(MdsNuspecPath) - -OutputDirectory $ @TODO: - -Version $(MdsPackageVersion) + nuget pack "$(MdsNuspecPath)" + -OutputDirectory "$(MdsArtifactsPath)" + -Version "$(MdsPackageVersion)" -Properties "COMMITID=$(CommitHash);Configuration=$(Configuration);" -Symbols -SymbolPackageFormat snupkg From e6687ff513563198f27e8029b984af43e80bdbca Mon Sep 17 00:00:00 2001 From: Ben Russell Date: Thu, 26 Feb 2026 13:46:44 -0600 Subject: [PATCH 05/12] Get common ref project building to artifacts folder, a la common mds project. --- .../ref/Microsoft.Data.SqlClient.csproj | 14 ++++++++- .../src/Microsoft.Data.SqlClient.csproj | 1 - tools/specs/Microsoft.Data.SqlClient.nuspec | 30 +++++++++---------- 3 files changed, 27 insertions(+), 18 deletions(-) diff --git a/src/Microsoft.Data.SqlClient/ref/Microsoft.Data.SqlClient.csproj b/src/Microsoft.Data.SqlClient/ref/Microsoft.Data.SqlClient.csproj index 401b0c7d8b..d2167d53d7 100644 --- a/src/Microsoft.Data.SqlClient/ref/Microsoft.Data.SqlClient.csproj +++ b/src/Microsoft.Data.SqlClient/ref/Microsoft.Data.SqlClient.csproj @@ -12,13 +12,25 @@ - true $(SigningKeyPath) + + + + $(RepoRoot)artifacts/ + + + $(ArtifactPath)$(AssemblyName).ref/$(Configuration)/ + + diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft.Data.SqlClient.csproj b/src/Microsoft.Data.SqlClient/src/Microsoft.Data.SqlClient.csproj index 87789ae3f5..d847bfd58d 100644 --- a/src/Microsoft.Data.SqlClient/src/Microsoft.Data.SqlClient.csproj +++ b/src/Microsoft.Data.SqlClient/src/Microsoft.Data.SqlClient.csproj @@ -15,7 +15,6 @@ - true diff --git a/tools/specs/Microsoft.Data.SqlClient.nuspec b/tools/specs/Microsoft.Data.SqlClient.nuspec index 9507357a00..0217b4ca24 100644 --- a/tools/specs/Microsoft.Data.SqlClient.nuspec +++ b/tools/specs/Microsoft.Data.SqlClient.nuspec @@ -123,23 +123,23 @@ command line to indicate where the DLLs are. --> - + - + - + - + - + @@ -154,27 +154,27 @@ - + - + - + - + - + @@ -188,9 +188,8 @@ - - + @@ -204,19 +203,18 @@ - - + - + - + From 52cf1df7de48e9033165be6e182b414e33049936 Mon Sep 17 00:00:00 2001 From: Ben Russell Date: Thu, 26 Feb 2026 14:13:26 -0600 Subject: [PATCH 06/12] Beginning migration of nuspec file --- tools/specs/Microsoft.Data.SqlClient.nuspec | 48 ++++++++++----------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/tools/specs/Microsoft.Data.SqlClient.nuspec b/tools/specs/Microsoft.Data.SqlClient.nuspec index 0217b4ca24..4a80550ec8 100644 --- a/tools/specs/Microsoft.Data.SqlClient.nuspec +++ b/tools/specs/Microsoft.Data.SqlClient.nuspec @@ -118,11 +118,7 @@ - - + @@ -154,10 +150,12 @@ - - - - + + + + + + @@ -204,20 +202,22 @@ - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + From c9e4bf5d9aad8ad6531326b4db14b6ad980bfa8b Mon Sep 17 00:00:00 2001 From: Ben Russell Date: Thu, 26 Feb 2026 16:19:11 -0600 Subject: [PATCH 07/12] Add build target to build2.proj for building the ref binaries --- build2.proj | 41 +++++++++++++++++++++++++++-------------- 1 file changed, 27 insertions(+), 14 deletions(-) diff --git a/build2.proj b/build2.proj index b801b9ccf9..225e6337a1 100644 --- a/build2.proj +++ b/build2.proj @@ -45,17 +45,33 @@ - + $(RepoRoot)artifacts/Microsoft.Data.SqlClient/ $(RepoRoot)tools/specs/Microsoft.Data.SqlClient.nuspec $(RepoRoot)src/Microsoft.Data.SqlClient/src/Microsoft.Data.SqlClient.csproj + $(RepoRoot)src/Microsoft.Data.SqlClient/ref/Microsoft.Data.SqlClient.csproj - + + + + + + + $(DotnetPath)dotnet build $(MdsRefProjectPath) + -p:Configuration=$(Configuration) + + + $([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " ")) + + + + + @@ -68,6 +84,7 @@ $([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " ")) + @@ -86,13 +103,9 @@ - + - - - git rev-parse HEAD @@ -102,7 +115,7 @@ - + nuget pack "$(MdsNuspecPath)" @@ -118,31 +131,31 @@ - + - + - + - + - + $(RepoRoot)src/Microsoft.Data.SqlClient/add-ons/AzureKeyVaultProvider/Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider.csproj - + From 4b487fa6b2d178a4cf6934215ceda054ac6095c1 Mon Sep 17 00:00:00 2001 From: Ben Russell Date: Thu, 26 Feb 2026 16:22:05 -0600 Subject: [PATCH 08/12] Remove AKV target from build2.proj as it is not ready for prime time --- build2.proj | 31 +++++++------------------------ 1 file changed, 7 insertions(+), 24 deletions(-) diff --git a/build2.proj b/build2.proj index 225e6337a1..fb7d8acbf0 100644 --- a/build2.proj +++ b/build2.proj @@ -1,6 +1,6 @@ - + + - - + + $(RepoRoot)artifacts/Microsoft.Data.SqlClient/ $(RepoRoot)tools/specs/Microsoft.Data.SqlClient.nuspec @@ -55,6 +55,7 @@ $(RepoRoot)src/Microsoft.Data.SqlClient/ref/Microsoft.Data.SqlClient.csproj + @@ -104,6 +105,7 @@ + @@ -132,6 +134,7 @@ + @@ -149,24 +152,4 @@ - - - - - $(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+", " ")) - - - - From d6f16257da4f5ec894bf4349d9c4354446c52bad Mon Sep 17 00:00:00 2001 From: Ben Russell Date: Thu, 26 Feb 2026 17:41:37 -0600 Subject: [PATCH 09/12] Getting TestMdsUnit target working --- build2.proj | 136 +++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 108 insertions(+), 28 deletions(-) diff --git a/build2.proj b/build2.proj index fb7d8acbf0..774067badd 100644 --- a/build2.proj +++ b/build2.proj @@ -3,44 +3,96 @@ Debug - + 10m + + + --blame-hang + --blame-hang-dump-type full + --blame-hang-timeout $(TestBlameTimeout) + - + true + + --collect "Code coverage" + --settings "$(RepoRoot)src/Microsoft.Data.SqlClient/tests/tools/Microsoft.Data.SqlClient.TestUtilities/CodeCoverage.runsettings" + + + + category!=failing&category!=flaky + + + --filter "$(TestFilter)" + + + + + -f $(TestFramework) + + + $(REPO_ROOT)\test_results @@ -49,10 +101,16 @@ - $(RepoRoot)artifacts/Microsoft.Data.SqlClient/ + + $(RepoRoot)src/Microsoft.Data.SqlClient/ + + $(RepoRoot)tools/specs/Microsoft.Data.SqlClient.nuspec - $(RepoRoot)src/Microsoft.Data.SqlClient/src/Microsoft.Data.SqlClient.csproj - $(RepoRoot)src/Microsoft.Data.SqlClient/ref/Microsoft.Data.SqlClient.csproj + + + $(MdsRoot)src/Microsoft.Data.SqlClient.csproj + $(MdsRoot)ref/Microsoft.Data.SqlClient.csproj + $(MdsRoot)tests/UnitTests/Microsoft.Data.SqlClient.UnitTests.csproj @@ -140,7 +198,7 @@ - + @@ -150,6 +208,28 @@ - + + + Unit-$(OS) + $(LogFilePrefix)-$(TestFramework) + + $(DotnetPath)dotnet test "$(MdsUnitTestProjectPath)" + -p:Configuration=$(Configuration) + $(TestBlameArgument) + $(TestCollectArgument) + $(TestFilterArgument) + $(TestFrameworkArgument) + --results-directory "$(TestResultsFolderPath)" + --logger:"trx;LogFilePrefix=$(LogFilePrefix) + + + + $([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " ")) + + + From cdfb309390c495d579f8ce723e8497bc729140e7 Mon Sep 17 00:00:00 2001 From: Ben Russell Date: Thu, 26 Feb 2026 18:51:51 -0600 Subject: [PATCH 10/12] Implement TestMdsFunctional target --- build2.proj | 73 +++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 65 insertions(+), 8 deletions(-) diff --git a/build2.proj b/build2.proj index 774067badd..0b444abfcc 100644 --- a/build2.proj +++ b/build2.proj @@ -1,8 +1,11 @@ - + + + + - + + + + $(TestPackageBuildArgument) + -p:MdsPackageVersion=$(MdsPackageVersion) + + + + Project + + $(TestPackageBuildArgument) + -p:ReferenceType=Package + + - $(REPO_ROOT)\test_results + $(RepoRoot)test_results - - - @@ -108,6 +142,7 @@ $(RepoRoot)tools/specs/Microsoft.Data.SqlClient.nuspec + $(MdsRoot)tests/FunctionalTests/Microsoft.Data.SqlClient.FunctionalTests.csproj $(MdsRoot)src/Microsoft.Data.SqlClient.csproj $(MdsRoot)ref/Microsoft.Data.SqlClient.csproj $(MdsRoot)tests/UnitTests/Microsoft.Data.SqlClient.UnitTests.csproj @@ -198,12 +233,33 @@ + + + MdsFunctional-$(OS) + $(LogFilePrefix)-$(TestFramework) + + + $(DotnetPath)dotnet test "$(MdsFunctionalTestProjectPath)" + -p:Configuration=$(Configuration) + $(TestBlameArgument) + $(TestCollectArgument) + $(TestFilterArgument) + $(TestFrameworkArgument) + $(TestPackageReferenceArgument) + --results-directory "$(TestResultsFolderPath)" + --logger:"trx;LogFilePrefix=$(LogFilePrefix)" + + + $([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " ")) + + + - + @@ -213,8 +269,9 @@ Note: This test exclusively uses project references, so neither ReferenceType nor any package version arguments are not specified in this command. --> - Unit-$(OS) + MdsUnit-$(OS) $(LogFilePrefix)-$(TestFramework) + $(DotnetPath)dotnet test "$(MdsUnitTestProjectPath)" -p:Configuration=$(Configuration) From 24a93977810d193a1b2fcaf7758ffca0a11a2af9 Mon Sep 17 00:00:00 2001 From: Ben Russell Date: Fri, 27 Feb 2026 13:07:44 -0600 Subject: [PATCH 11/12] Adding TestMdsManual target --- build2.proj | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/build2.proj b/build2.proj index 0b444abfcc..dff2760992 100644 --- a/build2.proj +++ b/build2.proj @@ -130,6 +130,18 @@ Example: C:\my_test_results\my_extra_specaial_test_run_folder\ --> $(RepoRoot)test_results + + + + -p:TestSet="$(TestSet)" @@ -143,6 +155,7 @@ $(MdsRoot)tests/FunctionalTests/Microsoft.Data.SqlClient.FunctionalTests.csproj + $(MdsRoot)tests/ManualTests/Microsoft.Data.SqlClient.ManualTests.csproj $(MdsRoot)src/Microsoft.Data.SqlClient.csproj $(MdsRoot)ref/Microsoft.Data.SqlClient.csproj $(MdsRoot)tests/UnitTests/Microsoft.Data.SqlClient.UnitTests.csproj @@ -249,7 +262,6 @@ --results-directory "$(TestResultsFolderPath)" --logger:"trx;LogFilePrefix=$(LogFilePrefix)" - $([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " ")) @@ -259,7 +271,27 @@ + + MdsManual-$(OS) + $(LogFilePrefix)-$(TestFramework) + $(LogFilePrefix)-$(TestSet) + + $(DotnetPath)dotnet test "$(MdsManualTestProjectPath)" + -p:Configuration=$(Configuration) + $(TestBlameArgument) + $(TestFilterArgument) + $(TestFrameworkArgument) + $(TestPackageReferenceArgument) + $(TestSetArgument) + --results-directory "$(TestResultsFolderPath)" + --logger:"trx;LogFilePrefix=$(LogFilePrefix) + + + $([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " ")) + + + From ef0dce30e6cb586cb950468d8b21c9e2801f3039 Mon Sep 17 00:00:00 2001 From: Ben Russell Date: Fri, 27 Feb 2026 14:46:38 -0600 Subject: [PATCH 12/12] Some AI test nonesense. --- .../ref/Microsoft.Data.SqlClient.csproj | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/src/Microsoft.Data.SqlClient/ref/Microsoft.Data.SqlClient.csproj b/src/Microsoft.Data.SqlClient/ref/Microsoft.Data.SqlClient.csproj index d2167d53d7..9b0ada20f1 100644 --- a/src/Microsoft.Data.SqlClient/ref/Microsoft.Data.SqlClient.csproj +++ b/src/Microsoft.Data.SqlClient/ref/Microsoft.Data.SqlClient.csproj @@ -4,6 +4,28 @@ net462;net8.0;net9.0;netstandard2.0 + + + Microsoft.Data.SqlClient is not supported on this platform. + $(TargetDir)$(AssemblyName).dll + + + $(IntermediateOutputPath)\$(TargetFramework)\$(AssemblyName).notsupported.cs + $(CoreCompileDependsOn);GenerateNotSupportedSource + + false + false + $(NoWarn);CS0618 + + + + + + + True + + + @@ -92,4 +114,36 @@ + + + + + + <_referencePathDirectoriesWithDuplicates Include="@(ReferencePath->'%(RootDir)%(Directory)'->TrimEnd('\'))" /> + + <_referencePathDirectories Include="%(_referencePathDirectoriesWithDuplicates.Identity)" /> + + + + + + "%(ResolvedMatchingContract.Identity)" + $(GenAPIArgs) -l:"@(_referencePathDirectories)" + $(GenAPIArgs) -o:"$(NotSupportedSourceFile)" + $(GenAPIArgs) -t:"$(GeneratePlatformNotSupportedAssemblyMessage)" + $(GenAPIArgs) -global + "$(DotnetPath)dotnet" "$(ToolsArtifactsDir)net8.0/Microsoft.DotNet.GenAPI.dll" + "$(ToolsArtifactsDir)net472\Microsoft.DotNet.GenAPI.exe" + + + + + + +