diff --git a/build2.proj b/build2.proj index 479d802f12..dff2760992 100644 --- a/build2.proj +++ b/build2.proj @@ -1,29 +1,184 @@ - + + + + - - - + Debug - - - - - - + + + + + + + $(TestPackageBuildArgument) + -p:MdsPackageVersion=$(MdsPackageVersion) + + + + Project + + $(TestPackageBuildArgument) + -p:ReferenceType=Package + + + + 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) - + + $(RepoRoot)test_results + + + + -p:TestSet="$(TestSet)" + + + + - $(RepoRoot)src/Microsoft.Data.SqlClient/src/Microsoft.Data.SqlClient.csproj + + $(RepoRoot)src/Microsoft.Data.SqlClient/ + + + $(RepoRoot)tools/specs/Microsoft.Data.SqlClient.nuspec + + + $(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 + - + + + + + + + $(DotnetPath)dotnet build $(MdsRefProjectPath) + -p:Configuration=$(Configuration) + + + $([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " ")) + + + + + @@ -33,9 +188,10 @@ -p:Configuration=$(Configuration) -p:TargetOs=Unix - - $([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " ")) + + $([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " ")) + @@ -48,10 +204,121 @@ -p:Configuration=$(Configuration) -p:TargetOs=Windows_NT - - $([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " ")) + + $([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " ")) - + + + + + + + + git rev-parse HEAD + + + + + + + + + + nuget pack "$(MdsNuspecPath)" + -OutputDirectory "$(MdsArtifactsPath)" + -Version "$(MdsPackageVersion)" + -Properties "COMMITID=$(CommitHash);Configuration=$(Configuration);" + -Symbols + -SymbolPackageFormat snupkg + + + $([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " ")) + + + + + + + + + + + + + + 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+", " ")) + + + + + + + + + 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+", " ")) + + + + + + + + + + MdsUnit-$(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+", " ")) + + + + diff --git a/src/Microsoft.Data.SqlClient/ref/Microsoft.Data.SqlClient.csproj b/src/Microsoft.Data.SqlClient/ref/Microsoft.Data.SqlClient.csproj index 401b0c7d8b..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 + + + @@ -12,13 +34,25 @@ - true $(SigningKeyPath) + + + + $(RepoRoot)artifacts/ + + + $(ArtifactPath)$(AssemblyName).ref/$(Configuration)/ + + @@ -80,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" + + + + + + + diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft.Data.SqlClient.csproj b/src/Microsoft.Data.SqlClient/src/Microsoft.Data.SqlClient.csproj index fb54bc02ef..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 @@ -28,29 +27,17 @@ - - - net462;net8.0;net9.0 - - - - - Windows_NT + + $(OS) - + + + + + @@ -62,6 +49,15 @@ $(DefineConstants);_WINDOWS + + + net8.0;net9.0 + + + + $(TargetFrameworks);net462 + + diff --git a/tools/specs/Microsoft.Data.SqlClient.nuspec b/tools/specs/Microsoft.Data.SqlClient.nuspec index 9507357a00..4a80550ec8 100644 --- a/tools/specs/Microsoft.Data.SqlClient.nuspec +++ b/tools/specs/Microsoft.Data.SqlClient.nuspec @@ -118,28 +118,24 @@ - - - + + - + - + - + - + @@ -154,27 +150,29 @@ - - - - + + + + + + - + - + - + - + @@ -188,9 +186,8 @@ - - + @@ -204,22 +201,23 @@ - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + +