From 701e97a4f6b6893a7cff41c4c62132e1655de709 Mon Sep 17 00:00:00 2001 From: Paul Medynski <31868385+paulmedynski@users.noreply.github.com> Date: Thu, 20 Feb 2025 11:35:16 -0400 Subject: [PATCH] User Story 33636: Add Linux build support - Minimal build changes to get everything to compile on Linux. - Fixed BuildTools target errors. - Changed all elements to which provides better dotnet build output. - Removed unused and obsolete build properties. - Cleaned up BUILDGUIDE. - Replaced property with everywhere. - Normalized how we specify and check the ReferenceType property. - Reorganized how project vs package references are used in build.proj. - Explicity unsetting 'TF' variable inherited from 'ADO Build Properties' library. - Removed 'Update AKV MDS package version' step. - Added TestMicrosoftDataSqlClientVersion property to AKV Package build steps. - Updated CI test step to use new runtime-specific build.proj targets. --- BUILDGUIDE.md | 106 +++-- RunPackageReferenceTests.cmd | 54 +-- RunProjectReferenceTests.cmd | 12 +- RunTests.sh | 4 +- build.proj | 445 +++++++++++++----- .../jobs/validate-signed-package-job.yml | 2 +- .../templates/steps/build-all-tests-step.yml | 10 - .../build-and-run-tests-netcore-step.yml | 16 +- .../steps/build-and-run-tests-netfx-step.yml | 16 +- .../templates/steps/ci-project-build-step.yml | 16 +- .../steps/copy-dlls-for-test-step.yml | 6 +- .../steps/generate-nuget-package-step.yml | 6 +- .../templates/steps/publish-symbols-step.yml | 6 +- .../templates/steps/run-all-tests-step.yml | 26 +- .../update-nuget-config-local-feed-step.yml | 60 +-- eng/pipelines/jobs/build-akv-official-job.yml | 4 +- .../libraries/ci-build-variables.yml | 9 +- src/Directory.Build.props | 26 +- ...waysEncrypted.AzureKeyVaultProvider.csproj | 27 +- .../add-ons/Directory.Build.props | 43 +- .../ref/Microsoft.Data.SqlClient.csproj | 1 - .../src/Microsoft.Data.SqlClient.csproj | 1 - .../netfx/ref/Microsoft.Data.SqlClient.csproj | 2 +- .../netfx/src/Microsoft.Data.SqlClient.csproj | 26 +- ...nectionString.cs => DbConnectionString.cs} | 0 ....cs => SmiEventSink_DeferredProcessing.cs} | 8 +- .../Microsoft/Data/SqlClient/SqlCommand.cs | 6 +- .../CustomRetryLogicProvider.csproj | 25 +- .../tests/Directory.Build.props | 36 +- .../tests/Docker/Directory.Build.props | 8 - ...soft.Data.SqlClient.DockerLinuxTest.csproj | 2 +- .../Microsoft.Data.SqlClient.Tests.csproj | 115 +++-- ....Data.SqlClient.ManualTesting.Tests.csproj | 73 ++- ...Data.SqlClient.ManualTesting.Tests.ruleset | 7 +- .../SQL/UdtTest/UDTs/Address/Address.csproj | 33 +- .../SQL/UdtTest/UDTs/Circle/Circle.csproj | 33 +- .../SQL/UdtTest/UDTs/Shapes/Shapes.csproj | 33 +- .../UdtTest/UDTs/Utf8String/Utf8String.csproj | 33 +- .../tests/tools/Directory.Build.props | 8 - ...crosoft.Data.SqlClient.ExtUtilities.csproj | 1 + ...rosoft.Data.SqlClient.TestUtilities.csproj | 9 +- ...tory.Build.Props => Directory.Build.props} | 7 +- tools/props/Versions.props | 2 +- tools/targets/NotSupported.targets | 2 +- 44 files changed, 855 insertions(+), 510 deletions(-) rename src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/Common/{DBConnectionString.cs => DbConnectionString.cs} (100%) rename src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/Server/{SmiEventSink_DeferedProcessing.cs => SmiEventSink_DeferredProcessing.cs} (81%) delete mode 100644 src/Microsoft.Data.SqlClient/tests/Docker/Directory.Build.props delete mode 100644 src/Microsoft.Data.SqlClient/tests/tools/Directory.Build.props rename tools/GenAPI/{Directory.Build.Props => Directory.Build.props} (62%) diff --git a/BUILDGUIDE.md b/BUILDGUIDE.md index 2f1bf6c486..0b99e0794a 100644 --- a/BUILDGUIDE.md +++ b/BUILDGUIDE.md @@ -16,37 +16,40 @@ Once the environment is setup properly, execute the desired set of commands belo ### Targets -|Target|Description| +|Target|Target Frameworks|Description| |-|-| -|`BuildAllConfigurations`|Default target. Builds the .NET Framework and .NET drivers for all target frameworks and operating systems.| -|`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.| -|`BuildTests`|Builds tests for the .NET and .NET Framework drivers.| -|`BuildTestsNetCore`|Builds tests for the .NET driver.| -|`BuildTestsNetFx`|Builds tests for the .NET Framework driver.| +|`BuildAkv`|net462, net8.0, net9.0|Builds the Azure Key Vault Provider package for all supported platforms.| +|`BuildAll`|net462, net8.0, net9.0|Builds the SQL Server lib and driver.| +|`BuildAllConfigurations`|net462, net8.0, net9.0|**Default Target** Builds the driver for all operating systems.| +|`BuildNetCore`|net8.0, net9.0|Builds the driver for all .NET target frameworks.| +|`BuildNetCoreAllOS`|net8.0, net9.0|Builds the driver for all .NET target frameworks and operating systems.| +|`BuildNetFx`|net462||Builds the driver for all .NET Framework target frameworks.| +|`BuildSqlServerPackage`|net462, net8.0, net9.0|Builds the SQL Server NuGet package.| +|`BuildTests`|net462, net8.0, net9.0|Builds all test projects| +|`BuildTestsNetCore`|net8.0, net9.0|Builds all tests projects for the .NET| +|`BuildTestsNetFx`|net462|Builds all test projects for .NET Framework.| +|`BuildTools`|net9.0|Builds the tool projects used by other targets.| |`Clean`|Cleans generated files.| -|`Restore`|Restores Nuget packages.| -|`RunTests`|Runs the functional and manual tests for the .NET Framework and .NET drivers| -|`RunFunctionalTests`|Runs just the functional tests for the .NET Framework and .NET drivers| -|`RunManualTests`|Runs just the manual tests for the .NET Framework and .NET drivers| -|`BuildAkv`|Builds the Azure Key Vault Provider package for all supported platforms.| - +|`Restore`|Restores Nuget packages required for `BuildAll`.| +|`RunTests`|Runs the functional and manual tests for the runtimes supported on the host OS| +|`RunFunctionalTests`|Runs just the functional tests for the runtimes supported on the host OS| +|`RunManualTests`|Runs just the manual tests for the runtimes supported on the host OS| ### Parameters + |Name|Supported Values|Default|Description| |-|-|-|-| |`Configuration`|`Debug`, `Release`|`Debug`|Sets the release configuration.| -|`BuildNetFx`|`true`, `false`|`true` (Windows), `false` (other)|If false, skips building the .NET Framework driver on Windows.| -|`OSGroup`|`Unix`, `Windows_NT`, `AnyOS`|typically defaults to the client system's OS, unless using `BuildAllConfigurations` or an `AnyOS` specific target|The operating system to target.| -|`Platform`|`AnyCPU`, `x86`, `x64`, `ARM`, `ARM64`|`AnyCPU`|May only be set when using package reference type or running tests.| -|`TestSet`|`1`, `2`, `3`, `AE`|all|Build or run a subset of the manual tests. Omit (default) to target all tests.| -|`DotnetPath`|Absolute file path to an installed `dotnet` version.|The system default specified by the path variable|Set to run tests using a specific dotnet version (e.g. C:\net6-win-x86\)| -|`TF`|`net8.0`, `net462`, `net47`, `net471`, `net472`, `net48`, `net481`|`net8.0` in netcore, `net462` in netfx|Sets the target framework when building or running tests. Not applicable when building the drivers.| +|`DotnetPath`|Absolute directory containing the `dotnet` CLI toolchain to use.|Use `dotnet` CLI in the system path.|Set to run tests using a specific dotnet version (e.g. C:\net6-win-x86\)| +|`OSGroup`|`Unix`, `Windows_NT`, `AnyOS`|Defaults to the host OS, unless using `BuildAllConfigurations` or an `AnyOS` specific target|The operating system to target.| +|`Platform`|`AnyCPU`, `x86`, `x64`, `ARM`, `ARM64`|`AnyCPU`|Relevant when using package reference type or running tests.| +|`ReferenceType`|`Package`||Specify `Package` to reference MDS as a NuGet <PackageReference>. Omit (the default), or specify anything except `Package`, to build downstream projects (i.e. AKV, tests) by referencing `Microsoft.Data.SqlClient` as a <ProjectReference>. | |`ResultsDirectory`|An absolute file path|./TestResults relative to current directory|Specifies where to write test results.| - +|`TestSet`|`1`, `2`, `3`, `AE`||Build or run a subset of the manual tests. Omit (default) to build and run all tests.| +|`TF`|`net462`, `net47`, `net471`, `net472`, `net48`, `net481`, `net8.0`, `net9.0`||Sets the target framework when building add-ons and tests, or when running tests. Not applicable when building the drivers.| ## Example Workflows using MSBuild (Recommended) + Using the default configuration and running all tests: ```bash @@ -104,8 +107,8 @@ Manual Tests require the below setup to run: |TCPConnectionStringHGSVBS | (Optional) Connection String for a TCP enabled SQL Server with Host Guardian Service (HGS) attestation protocol configuration. | `Server=tcp:{servername}; Database={Database_Name}; UID={UID}; PWD={PWD}; Attestation Protocol = HGS; Enclave Attestation Url = {AttestationURL};`| |TCPConnectionStringNoneVBS | (Optional) Connection String for a TCP enabled SQL Server with a VBS Enclave and using None Attestation protocol configuration. | `Server=tcp:{servername}; Database={Database_Name}; UID={UID}; PWD={PWD}; Attestation Protocol = NONE;`| |TCPConnectionStringAASSGX | (Optional) Connection String for a TCP enabled SQL Server with a SGX Enclave and using Microsoft Azure Attestation (AAS) attestation protocol configuration. | `Server=tcp:{servername}; Database={Database_Name}; UID={UID}; PWD={PWD}; Attestation Protocol = AAS; Enclave Attestation Url = {AttestationURL};`| - |EnclaveEnabled | Enables tests requiring an enclave-configured server.| - |TracingEnabled | Enables EventSource related tests | + |EnclaveEnabled | Enables tests requiring an enclave-configured server.|| + |TracingEnabled | Enables EventSource related tests || |AADAuthorityURL | (Optional) Identifies the OAuth2 authority resource for `Server` specified in `AADPasswordConnectionString` | `https://login.windows.net/`, where `` is the tenant ID of the Azure Active Directory (Azure AD) tenant | |AADPasswordConnectionString | (Optional) Connection String for testing Azure Active Directory Password Authentication. | `Data Source={server.database.windows.net}; Initial Catalog={Azure_DB_Name};Authentication=Active Directory Password; User ID={AAD_User}; Password={AAD_User_Password};`| |AADSecurePrincipalId | (Optional) The Application Id of a registered application which has been granted permission to the database defined in the AADPasswordConnectionString. | {Application ID} | @@ -117,28 +120,27 @@ Manual Tests require the below setup to run: |LocalDbSharedInstanceName | (Optional) If LocalDB testing is supported and the instance is shared, this property configures the name of the shared instance of LocalDB to connect to. | Name of shared instance of LocalDB. | |FileStreamDirectory | (Optional) If File Stream is enabled on SQL Server, pass local directory path to be used for setting up File Stream enabled database. | `D:\\escaped\\absolute\\path\\to\\directory\\` | |UseManagedSNIOnWindows | (Optional) Enables testing with Managed SNI on Windows| `true` OR `false`| - |DNSCachingConnString | Connection string for a server that supports DNS Caching| - |EnclaveAzureDatabaseConnString | (Optional) Connection string for Azure database with enclaves | - |ManagedIdentitySupported | (Optional) When set to `false` **Managed Identity** related tests won't run. The default value is `true`. | - |IsManagedInstance | (Optional) When set to `true` **TVP** related tests will use on non-Azure bs files to compare test results. this is needed when testing against Managed Instances or TVP Tests will fail on Test set 3. The default value is `false`. | + |DNSCachingConnString | Connection string for a server that supports DNS Caching|| + |EnclaveAzureDatabaseConnString | (Optional) Connection string for Azure database with enclaves || + |ManagedIdentitySupported | (Optional) When set to `false` **Managed Identity** related tests won't run. The default value is `true`. || + |IsManagedInstance | (Optional) When set to `true` **TVP** related tests will use on non-Azure bs files to compare test results. this is needed when testing against Managed Instances or TVP Tests will fail on Test set 3. The default value is `false`. || |PowerShellPath | The full path to PowerShell.exe. This is not required if the path is present in the PATH environment variable. | `D:\\escaped\\absolute\\path\\to\\PowerShell.exe` | - ## Example workflows using the Dotnet SDK -#### Run Functional Tests +### Run Functional Tests - Windows (`netfx x86`): ```bash msbuild -dotnet test "src\Microsoft.Data.SqlClient\tests\FunctionalTests\Microsoft.Data.SqlClient.Tests.csproj" -p:Platform="x86" -p:Configuration="Release" -p:TestTargetOS="Windowsnetfx" --no-build -v n --filter "category!=nonnetfxtests&category!=failing&category!=nonwindowstests" +dotnet test "src\Microsoft.Data.SqlClient\tests\FunctionalTests\Microsoft.Data.SqlClient.Tests.csproj" -p:Platform="x86" -p:Configuration="Release" -p:TF=net462 --no-build -v n --filter "category!=nonnetfxtests&category!=failing&category!=nonwindowstests" ``` - Windows (`netfx x64`): ```bash -dotnet test "src\Microsoft.Data.SqlClient\tests\FunctionalTests\Microsoft.Data.SqlClient.Tests.csproj" -p:Platform="x64" -p:Configuration="Release" -p:TestTargetOS="Windowsnetfx" --no-build -v n --filter "category!=nonnetfxtests&category!=failing&category!=nonwindowstests" +dotnet test "src\Microsoft.Data.SqlClient\tests\FunctionalTests\Microsoft.Data.SqlClient.Tests.csproj" -p:Platform="x64" -p:Configuration="Release" -p:TF=net462 --no-build -v n --filter "category!=nonnetfxtests&category!=failing&category!=nonwindowstests" ``` - AnyCPU: @@ -148,53 +150,54 @@ dotnet test "src\Microsoft.Data.SqlClient\tests\FunctionalTests\Microsoft.Data.S Windows (`netcoreapp`): ```bash -dotnet test "src\Microsoft.Data.SqlClient\tests\FunctionalTests\Microsoft.Data.SqlClient.Tests.csproj" -p:Platform="AnyCPU" -p:Configuration="Release" -p:TestTargetOS="Windowsnetcoreapp" --no-build -v n --filter "category!=nonnetcoreapptests&category!=failing&category!=nonwindowstests" +dotnet test "src\Microsoft.Data.SqlClient\tests\FunctionalTests\Microsoft.Data.SqlClient.Tests.csproj" -p:Platform="AnyCPU" -p:Configuration="Release" -p:TF=net8.0 --no-build -v n --filter "category!=nonnetcoreapptests&category!=failing&category!=nonwindowstests" ``` Unix (`netcoreapp`): ```bash -dotnet test "src/Microsoft.Data.SqlClient/tests/FunctionalTests/Microsoft.Data.SqlClient.Tests.csproj" -p:Platform="AnyCPU" -p:Configuration="Release" -p:TestTargetOS="Unixnetcoreapp" --no-build -v n --filter "category!=nonnetcoreapptests&category!=failing&category!=nonlinuxtests&category!=nonuaptests" +dotnet test "src/Microsoft.Data.SqlClient/tests/FunctionalTests/Microsoft.Data.SqlClient.Tests.csproj" -p:Platform="AnyCPU" -p:Configuration="Release" -p:TF=net8.0 --no-build -v n --filter "category!=nonnetcoreapptests&category!=failing&category!=nonlinuxtests&category!=nonuaptests" ``` -#### Run Manual Tests + +### Run Manual Tests - Windows (`netfx x86`): ```bash -dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" -p:Platform="x86" -p:Configuration="Release" -p:TestTargetOS="Windowsnetfx" --no-build -v n --filter "category!=nonnetfxtests&category!=failing&category!=nonwindowstests" +dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" -p:Platform="x86" -p:Configuration="Release" -p:TF=net462 --no-build -v n --filter "category!=nonnetfxtests&category!=failing&category!=nonwindowstests" ``` - Windows (`netfx x64`): ```bash -dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" -p:Platform="x64" -p:Configuration="Release" -p:TestTargetOS="Windowsnetfx" --no-build -v n --filter "category!=nonnetfxtests&category!=failing&category!=nonwindowstests" +dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" -p:Platform="x64" -p:Configuration="Release" -p:TF=net462 --no-build -v n --filter "category!=nonnetfxtests&category!=failing&category!=nonwindowstests" ``` - Windows (`netfx`): ```bash -dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" -p:Platform="AnyCPU" -p:Configuration="Release" -p:TestTargetOS="Windowsnetfx" --no-build -v n --filter "category!=nonnetfxtests&category!=failing&category!=nonwindowstests" +dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" -p:Platform="AnyCPU" -p:Configuration="Release" -p:TF=net462 --no-build -v n --filter "category!=nonnetfxtests&category!=failing&category!=nonwindowstests" ``` - Windows (`netcoreapp`): ```bash -dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" -p:Platform="AnyCPU" -p:Configuration="Release" -p:TestTargetOS="Windowsnetcoreapp" --no-build -v n --filter "category!=nonnetcoreapptests&category!=failing&category!=nonwindowstests" +dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" -p:Platform="AnyCPU" -p:Configuration="Release" -p:TF=net8.0 --no-build -v n --filter "category!=nonnetcoreapptests&category!=failing&category!=nonwindowstests" ``` - Unix (`netcoreapp`): ```bash -dotnet test "src/Microsoft.Data.SqlClient/tests/ManualTests/Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" -p:Platform="AnyCPU" -p:Configuration="Release" -p:TestTargetOS="Unixnetcoreapp" --no-build -v n --filter "category!=nonnetcoreapptests&category!=failing&category!=nonlinuxtests&category!=nonuaptests" +dotnet test "src/Microsoft.Data.SqlClient/tests/ManualTests/Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" -p:Platform="AnyCPU" -p:Configuration="Release" -p:TF=net8.0 --no-build -v n --filter "category!=nonnetcoreapptests&category!=failing&category!=nonlinuxtests&category!=nonuaptests" ``` -## Run A Single Test +### Run A Single Test ```bash -dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" -p:Platform="AnyCPU" -p:Configuration="Release" -p:TestTargetOS="Windowsnetcoreapp" --no-build -v n --filter "FullyQualifiedName=Microsoft.Data.SqlClient.ManualTesting.Tests.AlwaysEncrypted.CspProviderExt.TestKeysFromCertificatesCreatedWithMultipleCryptoProviders" +dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" -p:Platform="AnyCPU" -p:Configuration="Release" -p:TF=net8.0 --no-build -v n --filter "FullyQualifiedName=Microsoft.Data.SqlClient.ManualTesting.Tests.AlwaysEncrypted.CspProviderExt.TestKeysFromCertificatesCreatedWithMultipleCryptoProviders" ``` -## Testing with Custom ReferenceType +## Testing with Custom MDS Reference Type Tests can be built and run with custom "Reference Type" property that enables different styles of testing: @@ -205,14 +208,14 @@ Tests can be built and run with custom "Reference Type" property that enables di > CREATE A NUGET PACKAGE WITH BELOW COMMAND AND ADD TO LOCAL FOLDER + UPDATE NUGET CONFIG FILE TO READ FROM THAT LOCATION > > ```bash -> msbuild -p:configuration=Release +> msbuild -p:Configuration=Release > ``` 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 Reference Type -For .NET, all 4 reference types are supported: +For .NET: ```bash msbuild -t:BuildTestsNetCore -p:ReferenceType=Project @@ -221,7 +224,7 @@ msbuild -t:BuildTestsNetCore -p:ReferenceType=Project msbuild -t:BuildTestsNetCore -p:ReferenceType=Package ``` -For .NET Framework, below reference types are supported: +For .NET Framework: ```bash msbuild -t:BuildTestsNetFx -p:ReferenceType=Project @@ -245,26 +248,25 @@ Tests can be built and run with custom Target Frameworks. See the below examples ### Building Tests with custom target framework ```bash -msbuild -t:BuildTestsNetFx -p:TargetNetFxVersion=net462 +msbuild -t:BuildTestsNetFx -p:TF=net462 # Build the tests for custom .NET Framework target ``` ```bash -msbuild -t:BuildTestsNetCore -p:TargetNetCoreVersion=net8.0 +msbuild -t:BuildTestsNetCore -p:TF=net8.0 # Build the tests for custom .NET target ``` ### Running Tests with custom target framework (traditional) ```bash -dotnet test -p:TargetNetFxVersion=net462 ... +dotnet test -p:F=net462 ... # Use above property to run Functional Tests with custom .NET Framework target -dotnet test -p:TargetNetCoreVersion=net8.0 ... +dotnet test -p:TF=net8.0 ... # Use above property to run Functional Tests with custom .NET target ``` - ## Using Managed SNI on Windows Managed SNI can be enabled on Windows by enabling the below AppContext switch: @@ -349,13 +351,13 @@ Launch a shell and change into the project directory: PowerShell: ```pwsh -> cd src\Microsoft.Data.SqlClient\tests\PerformanceTests +cd src\Microsoft.Data.SqlClient\tests\PerformanceTests ``` Bash: ```bash -$ cd src/Microsoft.Data.SqlClient/tests/PerformanceTests +cd src/Microsoft.Data.SqlClient/tests/PerformanceTests ``` ### Create Database diff --git a/RunPackageReferenceTests.cmd b/RunPackageReferenceTests.cmd index 4813c182ce..9d2fb4672b 100644 --- a/RunPackageReferenceTests.cmd +++ b/RunPackageReferenceTests.cmd @@ -19,43 +19,43 @@ call :pauseOnError msbuild -p:Configuration="Release" -t:BuildAKVNetCore -p:Refe call :pauseOnError msbuild -p:Configuration="Release" -t:BuildAKVNetSt -p:ReferenceType=Package :: .NET - REFERENCE TYPE "PACKAGE" -call :pauseOnError msbuild -p:Configuration="Release" -t:BuildTestsNetCore -p:ReferenceType=Package -p:TargetNetCoreVersion=net8.0 -call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\FunctionalTests\Microsoft.Data.SqlClient.Tests.csproj" -p:Configuration="Release" -p:TestTargetOS="Windowsnetcoreapp" --no-build -v n --filter "category!=nonnetcoreapptests&category!=failing&category!=nonwindowstests" -p:Platform="AnyCPU" -p:TargetNetCoreVersion=net8.0 -p:ReferenceType=Package -l:trx;LogFileName=..\..\..\..\..\artifacts\Results\package-net8.0-functional-anycpu.xml -call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" -p:Configuration="Release" -p:TestTargetOS="Windowsnetcoreapp" --no-build -v n --filter "category!=nonnetcoreapptests&category!=failing&category!=nonwindowstests" -p:Platform="AnyCPU" -p:TargetNetCoreVersion=net8.0 -p:ReferenceType=Package -l:trx;LogFileName=..\..\..\..\..\artifacts\Results\package-net8.0-manual-anycpu.xml +call :pauseOnError msbuild -p:Configuration="Release" -t:BuildTestsNetCore -p:ReferenceType=Package -p:TF=net8.0 +call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\FunctionalTests\Microsoft.Data.SqlClient.Tests.csproj" -p:Configuration="Release" --no-build -v n --filter "category!=nonnetcoreapptests&category!=failing&category!=nonwindowstests" -p:Platform="AnyCPU" -p:TF=net8.0 -p:ReferenceType=Package -l:trx;LogFileName=..\..\..\..\..\artifacts\Results\package-net8.0-functional-anycpu.xml +call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" -p:Configuration="Release" --no-build -v n --filter "category!=nonnetcoreapptests&category!=failing&category!=nonwindowstests" -p:Platform="AnyCPU" -p:TF=net8.0 -p:ReferenceType=Package -l:trx;LogFileName=..\..\..\..\..\artifacts\Results\package-net8.0-manual-anycpu.xml -call :pauseOnError msbuild -p:Configuration="Release" -t:BuildTestsNetCore -p:ReferenceType=Package -p:Platform=x64 -p:TargetNetCoreVersion=net8.0 -call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\FunctionalTests\Microsoft.Data.SqlClient.Tests.csproj" -p:Configuration="Release" -p:TestTargetOS="Windowsnetcoreapp" --no-build -v n --filter "category!=nonnetcoreapptests&category!=failing&category!=nonwindowstests" -p:Platform="x64" -p:TargetNetCoreVersion=net8.0 -p:ReferenceType=Package -l:trx;LogFileName=..\..\..\..\..\artifacts\Results\package-net8.0-functional-x64.xml -call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" -p:Configuration="Release" -p:TestTargetOS="Windowsnetcoreapp" --no-build -v n --filter "category!=nonnetcoreapptests&category!=failing&category!=nonwindowstests" -p:Platform="x64" -p:TargetNetCoreVersion=net8.0 -p:ReferenceType=Package -l:trx;LogFileName=..\..\..\..\..\artifacts\Results\package-net8.0-manual-x64.xml +call :pauseOnError msbuild -p:Configuration="Release" -t:BuildTestsNetCore -p:ReferenceType=Package -p:Platform=x64 -p:TF=net8.0 +call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\FunctionalTests\Microsoft.Data.SqlClient.Tests.csproj" -p:Configuration="Release" --no-build -v n --filter "category!=nonnetcoreapptests&category!=failing&category!=nonwindowstests" -p:Platform="x64" -p:TF=net8.0 -p:ReferenceType=Package -l:trx;LogFileName=..\..\..\..\..\artifacts\Results\package-net8.0-functional-x64.xml +call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" -p:Configuration="Release" --no-build -v n --filter "category!=nonnetcoreapptests&category!=failing&category!=nonwindowstests" -p:Platform="x64" -p:TF=net8.0 -p:ReferenceType=Package -l:trx;LogFileName=..\..\..\..\..\artifacts\Results\package-net8.0-manual-x64.xml -call :pauseOnError msbuild -p:Configuration="Release" -t:BuildTestsNetCore -p:ReferenceType=Package -p:Platform=Win32 -p:TargetNetCoreVersion=net8.0 -call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\FunctionalTests\Microsoft.Data.SqlClient.Tests.csproj" -p:Configuration="Release" -p:TestTargetOS="Windowsnetcoreapp" --no-build -v n --filter "category!=nonnetcoreapptests&category!=failing&category!=nonwindowstests" -p:Platform="Win32" -p:TargetNetCoreVersion=net8.0 -p:ReferenceType=Package -l:trx;LogFileName=..\..\..\..\..\artifacts\Results\package-net8.0-functional-win32.xml -call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" -p:Configuration="Release" -p:TestTargetOS="Windowsnetcoreapp" --no-build -v n --filter "category!=nonnetcoreapptests&category!=failing&category!=nonwindowstests" -p:Platform="Win32" -p:TargetNetCoreVersion=net8.0 -p:ReferenceType=Package -l:trx;LogFileName=..\..\..\..\..\artifacts\Results\package-net8.0-manual-win32.xml +call :pauseOnError msbuild -p:Configuration="Release" -t:BuildTestsNetCore -p:ReferenceType=Package -p:Platform=Win32 -p:TF=net8.0 +call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\FunctionalTests\Microsoft.Data.SqlClient.Tests.csproj" -p:Configuration="Release" --no-build -v n --filter "category!=nonnetcoreapptests&category!=failing&category!=nonwindowstests" -p:Platform="Win32" -p:TF=net8.0 -p:ReferenceType=Package -l:trx;LogFileName=..\..\..\..\..\artifacts\Results\package-net8.0-functional-win32.xml +call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" -p:Configuration="Release" --no-build -v n --filter "category!=nonnetcoreapptests&category!=failing&category!=nonwindowstests" -p:Platform="Win32" -p:TF=net8.0 -p:ReferenceType=Package -l:trx;LogFileName=..\..\..\..\..\artifacts\Results\package-net8.0-manual-win32.xml :: .NET Framework - REFERENCE TYPE "PACKAGE" -call :pauseOnError msbuild -p:Configuration="Release" -t:BuildTestsNetFx -p:ReferenceType=Package -p:Platform=AnyCPU -p:TargetNetFxVersion=net462 -call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\FunctionalTests\Microsoft.Data.SqlClient.Tests.csproj" -p:Platform="AnyCPU" -p:Configuration="Release" -p:TestTargetOS="Windowsnetfx" --no-build -v n --filter "category!=nonnetfxtests&category!=failing&category!=nonwindowstests" -p:ReferenceType=Package -l:trx;LogFileName=..\..\..\..\..\artifacts\Results\package-net462-functional-anycpu.xml -call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" -p:Platform="AnyCPU" -p:Configuration="Release" -p:TestTargetOS="Windowsnetfx" --no-build -v n --filter "category!=nonnetfxtests&category!=failing&category!=nonwindowstests" -p:ReferenceType=Package -l:trx;LogFileName=..\..\..\..\..\artifacts\Results\package-net462-manual-anycpu.xml +call :pauseOnError msbuild -p:Configuration="Release" -t:BuildTestsNetFx -p:ReferenceType=Package -p:Platform=AnyCPU -p:TF=net462 +call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\FunctionalTests\Microsoft.Data.SqlClient.Tests.csproj" -p:Platform="AnyCPU" -p:Configuration="Release" --no-build -v n --filter "category!=nonnetfxtests&category!=failing&category!=nonwindowstests" -p:ReferenceType=Package -l:trx;LogFileName=..\..\..\..\..\artifacts\Results\package-net462-functional-anycpu.xml +call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" -p:Platform="AnyCPU" -p:Configuration="Release" --no-build -v n --filter "category!=nonnetfxtests&category!=failing&category!=nonwindowstests" -p:ReferenceType=Package -l:trx;LogFileName=..\..\..\..\..\artifacts\Results\package-net462-manual-anycpu.xml -call :pauseOnError msbuild -p:Configuration="Release" -t:BuildTestsNetFx -p:ReferenceType=Package -p:Platform=AnyCPU -p:TargetNetFxVersion=net48 -call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\FunctionalTests\Microsoft.Data.SqlClient.Tests.csproj" -p:Platform="AnyCPU" -p:Configuration="Release" -p:TestTargetOS="Windowsnetfx" --no-build -v n --filter "category!=nonnetfxtests&category!=failing&category!=nonwindowstests" -p:ReferenceType=Package -l:trx;LogFileName=..\..\..\..\..\artifacts\Results\package-net48-functional-anycpu.xml -call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" -p:Platform="AnyCPU" -p:Configuration="Release" -p:TestTargetOS="Windowsnetfx" --no-build -v n --filter "category!=nonnetfxtests&category!=failing&category!=nonwindowstests" -p:ReferenceType=Package -l:trx;LogFileName=..\..\..\..\..\artifacts\Results\package-net48-manual-anycpu.xml +call :pauseOnError msbuild -p:Configuration="Release" -t:BuildTestsNetFx -p:ReferenceType=Package -p:Platform=AnyCPU -p:TF=net48 +call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\FunctionalTests\Microsoft.Data.SqlClient.Tests.csproj" -p:Platform="AnyCPU" -p:Configuration="Release" --no-build -v n --filter "category!=nonnetfxtests&category!=failing&category!=nonwindowstests" -p:ReferenceType=Package -l:trx;LogFileName=..\..\..\..\..\artifacts\Results\package-net48-functional-anycpu.xml +call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" -p:Platform="AnyCPU" -p:Configuration="Release" --no-build -v n --filter "category!=nonnetfxtests&category!=failing&category!=nonwindowstests" -p:ReferenceType=Package -l:trx;LogFileName=..\..\..\..\..\artifacts\Results\package-net48-manual-anycpu.xml -call :pauseOnError msbuild -p:Configuration="Release" -t:BuildTestsNetFx -p:ReferenceType=Package -p:Platform=x64 -p:TargetNetFxVersion=net462 -call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\FunctionalTests\Microsoft.Data.SqlClient.Tests.csproj" -p:Platform="x64" -p:Configuration="Release" -p:TestTargetOS="Windowsnetfx" --no-build -v n --filter "category!=nonnetfxtests&category!=failing&category!=nonwindowstests" -p:ReferenceType=Package -l:trx;LogFileName=..\..\..\..\..\artifacts\Results\package-net462-functional-x64.xml -call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" -p:Platform="x64" -p:Configuration="Release" -p:TestTargetOS="Windowsnetfx" --no-build -v n --filter "category!=nonnetfxtests&category!=failing&category!=nonwindowstests" -p:ReferenceType=Package -l:trx;LogFileName=..\..\..\..\..\artifacts\Results\package-net462-manual-x64.xml +call :pauseOnError msbuild -p:Configuration="Release" -t:BuildTestsNetFx -p:ReferenceType=Package -p:Platform=x64 -p:TF=net462 +call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\FunctionalTests\Microsoft.Data.SqlClient.Tests.csproj" -p:Platform="x64" -p:Configuration="Release" --no-build -v n --filter "category!=nonnetfxtests&category!=failing&category!=nonwindowstests" -p:ReferenceType=Package -l:trx;LogFileName=..\..\..\..\..\artifacts\Results\package-net462-functional-x64.xml +call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" -p:Platform="x64" -p:Configuration="Release" --no-build -v n --filter "category!=nonnetfxtests&category!=failing&category!=nonwindowstests" -p:ReferenceType=Package -l:trx;LogFileName=..\..\..\..\..\artifacts\Results\package-net462-manual-x64.xml -call :pauseOnError msbuild -p:Configuration="Release" -t:BuildTestsNetFx -p:TargetNetFxVersion=net48 -p:Platform=x64 -p:ReferenceType=Package -call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\FunctionalTests\Microsoft.Data.SqlClient.Tests.csproj" -p:Platform="x64" -p:Configuration="Release" -p:TestTargetOS="Windowsnetfx" -p:TargetNetFxVersion=net48 --no-build -v n --filter "category!=nonnetfxtests&category!=failing&category!=nonwindowstests" -p:ReferenceType=Package -l:trx;LogFileName=..\..\..\..\..\artifacts\Results\package-net48-functional-x64.xml -call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" -p:Platform="x64" -p:Configuration="Release" -p:TestTargetOS="Windowsnetfx" -p:TargetNetFxVersion=net48 --no-build -v n --filter "category!=nonnetfxtests&category!=failing&category!=nonwindowstests" -p:ReferenceType=Package -l:trx;LogFileName=..\..\..\..\..\artifacts\Results\package-net48-manual-x64.xml +call :pauseOnError msbuild -p:Configuration="Release" -t:BuildTestsNetFx -p:TF=net48 -p:Platform=x64 -p:ReferenceType=Package +call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\FunctionalTests\Microsoft.Data.SqlClient.Tests.csproj" -p:Platform="x64" -p:Configuration="Release" -p:TF=net48 --no-build -v n --filter "category!=nonnetfxtests&category!=failing&category!=nonwindowstests" -p:ReferenceType=Package -l:trx;LogFileName=..\..\..\..\..\artifacts\Results\package-net48-functional-x64.xml +call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" -p:Platform="x64" -p:Configuration="Release" -p:TF=net48 --no-build -v n --filter "category!=nonnetfxtests&category!=failing&category!=nonwindowstests" -p:ReferenceType=Package -l:trx;LogFileName=..\..\..\..\..\artifacts\Results\package-net48-manual-x64.xml -call :pauseOnError msbuild -p:Configuration="Release" -t:BuildTestsNetFx -p:ReferenceType=Package -p:Platform=Win32 -p:TargetNetFxVersion=net462 -call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\FunctionalTests\Microsoft.Data.SqlClient.Tests.csproj" -p:Platform="Win32" -p:Configuration="Release" -p:TestTargetOS="Windowsnetfx" --no-build -v n --filter "category!=nonnetfxtests&category!=failing&category!=nonwindowstests" -p:ReferenceType=Package -l:trx;LogFileName=..\..\..\..\..\artifacts\Results\package-net462-functional-win32.xml -call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" -p:Platform="Win32" -p:Configuration="Release" -p:TestTargetOS="Windowsnetfx" --no-build -v n --filter "category!=nonnetfxtests&category!=failing&category!=nonwindowstests" -p:ReferenceType=Package -l:trx;LogFileName=..\..\..\..\..\artifacts\Results\package-net462-manual-win32.xml +call :pauseOnError msbuild -p:Configuration="Release" -t:BuildTestsNetFx -p:ReferenceType=Package -p:Platform=Win32 -p:TF=net462 +call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\FunctionalTests\Microsoft.Data.SqlClient.Tests.csproj" -p:Platform="Win32" -p:Configuration="Release" -p:TF=net462 --no-build -v n --filter "category!=nonnetfxtests&category!=failing&category!=nonwindowstests" -p:ReferenceType=Package -l:trx;LogFileName=..\..\..\..\..\artifacts\Results\package-net462-functional-win32.xml +call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" -p:Platform="Win32" -p:Configuration="Release" -p:TF=net462 --no-build -v n --filter "category!=nonnetfxtests&category!=failing&category!=nonwindowstests" -p:ReferenceType=Package -l:trx;LogFileName=..\..\..\..\..\artifacts\Results\package-net462-manual-win32.xml -call :pauseOnError msbuild -p:Configuration="Release" -t:BuildTestsNetFx -p:TargetNetFxVersion=net48 -p:Platform=Win32 -p:ReferenceType=Package -call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\FunctionalTests\Microsoft.Data.SqlClient.Tests.csproj" -p:Platform="Win32" -p:Configuration="Release" -p:TestTargetOS="Windowsnetfx" -p:TargetNetFxVersion=net48 --no-build -v n --filter "category!=nonnetfxtests&category!=failing&category!=nonwindowstests" -p:ReferenceType=Package -l:trx;LogFileName=..\..\..\..\..\artifacts\Results\package-net48-functional-Win32.xml -call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" -p:Platform="Win32" -p:Configuration="Release" -p:TestTargetOS="Windowsnetfx" -p:TargetNetFxVersion=net48 --no-build -v n --filter "category!=nonnetfxtests&category!=failing&category!=nonwindowstests" -p:ReferenceType=Package -l:trx;LogFileName=..\..\..\..\..\artifacts\Results\package-net48-manual-Win32.xml +call :pauseOnError msbuild -p:Configuration="Release" -t:BuildTestsNetFx -p:TF=net48 -p:Platform=Win32 -p:ReferenceType=Package +call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\FunctionalTests\Microsoft.Data.SqlClient.Tests.csproj" -p:Platform="Win32" -p:Configuration="Release" -p:TF=net48 --no-build -v n --filter "category!=nonnetfxtests&category!=failing&category!=nonwindowstests" -p:ReferenceType=Package -l:trx;LogFileName=..\..\..\..\..\artifacts\Results\package-net48-functional-Win32.xml +call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" -p:Platform="Win32" -p:Configuration="Release" -p:TF=net48 --no-build -v n --filter "category!=nonnetfxtests&category!=failing&category!=nonwindowstests" -p:ReferenceType=Package -l:trx;LogFileName=..\..\..\..\..\artifacts\Results\package-net48-manual-Win32.xml goto :eof diff --git a/RunProjectReferenceTests.cmd b/RunProjectReferenceTests.cmd index 2e37d0b712..53cf11e8f7 100644 --- a/RunProjectReferenceTests.cmd +++ b/RunProjectReferenceTests.cmd @@ -29,22 +29,22 @@ call :pauseOnError msbuild -t:Clean echo Building .NET Framework %netfxVersion% Tests ... call :pauseOnError msbuild -p:Configuration="Release" call :pauseOnError msbuild -p:Configuration="Release" -t:BuildAKVNetFx -call :pauseOnError msbuild -p:Configuration="Release" -t:BuildTestsNetFx -p:TargetNetFxVersion=%netfxVersion% +call :pauseOnError msbuild -p:Configuration="Release" -t:BuildTestsNetFx -p:TF=%netfxVersion% echo Running .NET Framework %netfxVersion% Tests ... -call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\FunctionalTests\Microsoft.Data.SqlClient.Tests.csproj" -p:Configuration="Release" -p:TestTargetOS="Windowsnetfx" -p:TargetNetFxVersion=%netfxVersion% --no-build -v n --filter "category!=nonnetfxtests&category!=failing&category!=nonwindowstests" -l:"trx;LogFileName=..\..\..\..\..\artifacts\Results\project-%netfxVersion%-functional-anycpu.xml" -call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" -p:Configuration="Release" -p:TestTargetOS="Windowsnetfx" -p:TargetNetFxVersion=%netfxVersion% --no-build -v n --filter "category!=nonnetfxtests&category!=failing&category!=nonwindowstests" -l:"trx;LogFileName=..\..\..\..\..\artifacts\Results\project-%netfxVersion%-manual-anycpu.xml" +call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\FunctionalTests\Microsoft.Data.SqlClient.Tests.csproj" -p:Configuration="Release" -p:TF=%netfxVersion% --no-build -v n --filter "category!=nonnetfxtests&category!=failing&category!=nonwindowstests" -l:"trx;LogFileName=..\..\..\..\..\artifacts\Results\project-%netfxVersion%-functional-anycpu.xml" +call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" -p:Configuration="Release" -p:TF=%netfxVersion% --no-build -v n --filter "category!=nonnetfxtests&category!=failing&category!=nonwindowstests" -l:"trx;LogFileName=..\..\..\..\..\artifacts\Results\project-%netfxVersion%-manual-anycpu.xml" echo Building .NET %netcoreVersion% Tests ... call pause call :pauseOnError msbuild -t:Clean call :pauseOnError msbuild -p:Configuration="Release" call :pauseOnError msbuild -p:Configuration="Release" -t:BuildAKVNetCoreAllOS -call :pauseOnError msbuild -p:Configuration="Release" -t:BuildTestsNetCore -p:TargetNetCoreVersion=%netcoreVersion% +call :pauseOnError msbuild -p:Configuration="Release" -t:BuildTestsNetCore -p:TF=%netcoreVersion% echo Running .NET %netcoreVersion% Tests ... -call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\FunctionalTests\Microsoft.Data.SqlClient.Tests.csproj" -p:Configuration="Release" -p:TestTargetOS="Windowsnetcoreapp" -p:TargetNetCoreVersion=%netcoreVersion% --no-build -v n --filter "category!=nonnetcoreapptests&category!=failing&category!=nonwindowstests" -l:"trx;LogFileName=..\..\..\..\..\artifacts\Results\project-%netcoreVersion%-functional-anycpu.xml" -call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" -p:Configuration="Release" -p:TestTargetOS="Windowsnetcoreapp" -p:TargetNetCoreVersion=%netcoreVersion% --no-build -v n --filter "category!=nonnetcoreapptests&category!=failing&category!=nonwindowstests" -l:"trx;LogFileName=..\..\..\..\..\artifacts\Results\project-%netcoreVersion%-manual-anycpu.xml" +call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\FunctionalTests\Microsoft.Data.SqlClient.Tests.csproj" -p:Configuration="Release" -p:TF=%netcoreVersion% --no-build -v n --filter "category!=nonnetcoreapptests&category!=failing&category!=nonwindowstests" -l:"trx;LogFileName=..\..\..\..\..\artifacts\Results\project-%netcoreVersion%-functional-anycpu.xml" +call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" -p:Configuration="Release" -p:TF=%netcoreVersion% --no-build -v n --filter "category!=nonnetcoreapptests&category!=failing&category!=nonwindowstests" -l:"trx;LogFileName=..\..\..\..\..\artifacts\Results\project-%netcoreVersion%-manual-anycpu.xml" goto :eof diff --git a/RunTests.sh b/RunTests.sh index ed3f22a9a1..55a1b3152b 100644 --- a/RunTests.sh +++ b/RunTests.sh @@ -4,5 +4,5 @@ dotnet msbuild -p:Configuration="Release" -t:BuildAKVNetCore -p:OSGroup=Unix -p: echo Building tests dotnet msbuild -p:Configuration="Release" -t:BuildTestsNetCore -p:OSGroup=Unix -p:Platform=AnyCPU echo Running SqlClient test suite -dotnet test "src/Microsoft.Data.SqlClient/tests/FunctionalTests/Microsoft.Data.SqlClient.Tests.csproj" -p:Platform="AnyCPU" -p:Configuration="Release" -p:TestTargetOS="Unixnetcoreapp" --no-build -v n --filter "category!=nonnetcoreapptests&category!=failing&category!=nonlinuxtests&category!=nonuaptests" -dotnet test "src/Microsoft.Data.SqlClient/tests/ManualTests/Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" -p:Platform="AnyCPU" -p:Configuration="Release" -p:TestTargetOS="Unixnetcoreapp" --no-build -v n --filter "category!=nonnetcoreapptests&category!=failing&category!=nonlinuxtests&category!=nonuaptests" +dotnet test "src/Microsoft.Data.SqlClient/tests/FunctionalTests/Microsoft.Data.SqlClient.Tests.csproj" -p:Platform="AnyCPU" -p:Configuration="Release" -p:TF=net8.0 --no-build -v n --filter "category!=nonnetcoreapptests&category!=failing&category!=nonlinuxtests&category!=nonuaptests" +dotnet test "src/Microsoft.Data.SqlClient/tests/ManualTests/Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" -p:Platform="AnyCPU" -p:Configuration="Release" -p:TF=net8.0 --no-build -v n --filter "category!=nonnetcoreapptests&category!=failing&category!=nonlinuxtests&category!=nonuaptests" diff --git a/build.proj b/build.proj index c470970f03..124d432995 100644 --- a/build.proj +++ b/build.proj @@ -14,22 +14,18 @@ AnyCPU true - - true - false - Windows - Unix - net9.0 - netfx - netcore - netfx - netcoreapp - $(TF) - $(TF) - true + + + true + Configuration=$(Configuration);AssemblyVersion=$(SqlServerAssemblyVersion);AssemblyFileVersion=$(SqlServerAssemblyFileVersion);Version=$(SqlServerPackageVersion); - Configuration=$(Configuration);AssemblyFileVersion=$(AssemblyFileVersion);TargetsWindows=$(TargetsWindows);TargetsUnix=$(TargetsUnix); - BuildProjectReferences=false;$(ProjectProperties);BuildForRelease=false;TargetNetCoreVersion=$(TargetNetCoreVersion);TargetNetFxVersion=$(TargetNetFxVersion) + BuildProj=true;Configuration=$(Configuration);AssemblyFileVersion=$(AssemblyFileVersion);TF=$(TF); + BuildProjectReferences=false;$(ProjectProperties);BuildForRelease=false TestResults + + - + @@ -82,7 +80,7 @@ - + @@ -98,37 +96,50 @@ - - + + - - - + + + - - $(DotNetCmd) dotnet build -c Release -p:ReferenceType=$(ReferenceType) - - + + - + - + - - - - - - - + + + + $(CI);$(SqlServerLibProperties);Platform=AnyCPU + + + + + + + $(CI);$(SqlServerLibProperties);Platform=$(Platform);ReferenceType=Package + + + @@ -136,45 +147,105 @@ - - - + + + - - - - - - - + + + + $(TestProjectProperties);Platform=AnyCPU + + + - - - - - - - - + + + $(TestProjectProperties);Platform=AnyCPU;ReferenceType=Package + + + - - - - - - - + + + + $(TestProjectProperties);Platform=AnyCPU + + + + + + + $(TestProjectProperties);Platform=AnyCPU;ReferenceType=Package + + + - - - + + + + $(TestProjectProperties);Platform=AnyCPU;TargetsNetFx=true + + + + + + + $(TestProjectProperties);Platform=AnyCPU;TargetsNetFx=true;ReferenceType=Package + + + + - - - + + + + $(TestProjectProperties);Platform=AnyCPU;TargetsNetFx=true + + + + + + + $(TestProjectProperties);Platform=AnyCPU;TargetsNetFx=true;ReferenceType=Package + + + @@ -183,43 +254,66 @@ - + - - + + $(DotnetPath)dotnet test "@(FunctionalTestsProj)" --no-build -v n -p:Configuration=$(Configuration) - -p:Target$(TFGroup)Version=$(TF) - -p:ReferenceType=$(ReferenceType) + -p:TargetsNetFx=true + -p:TF=$(TF) -p:TestSet=$(TestSet) - -p:TestTargetOS=Windows$(TargetGroup) + -p:ReferenceType=$(ReferenceType) --collect "Code coverage" --results-directory $(ResultsDirectory) - --filter "category!=non$(TargetGroup)tests&category!=failing&category!=nonwindowstests" - --logger:"trx;LogFilePrefix=Functional-Windows$(TargetGroup)-$(TestSet)" + --filter "category!=nonnetfxtests&category!=failing&category!=nonwindowstests" + --logger:"trx;LogFilePrefix=Functional-Windowsnetfx-$(TestSet)" $(TestCommand.Replace($([System.Environment]::NewLine), " ")) - + - - + + $(DotnetPath)dotnet test "@(FunctionalTestsProj)" --no-build -v n -p:Configuration=$(Configuration) - -p:TargetNetCoreVersion=$(TF) + -p:TF=$(TF) + -p:TestSet=$(TestSet) -p:ReferenceType=$(ReferenceType) + --collect "Code coverage" + --results-directory $(ResultsDirectory) + --filter "category!=nonnetcoreapptests&category!=failing&category!=nonwindowstests" + --logger:"trx;LogFilePrefix=Functional-Windowsnetcoreapp-$(TestSet)" + + $(TestCommand.Replace($([System.Environment]::NewLine), " ")) + + + + + + + + + + $(DotnetPath)dotnet test "@(FunctionalTestsProj)" + --no-build + -v n + -p:Configuration=$(Configuration) + -p:TF=$(TF) -p:TestSet=$(TestSet) - -p:TestTargetOS=Unixnetcoreapp + -p:ReferenceType=$(ReferenceType) --collect "Code coverage" --results-directory $(ResultsDirectory) --filter "category!=nonnetcoreapptests&category!=failing&category!=nonlinuxtests&category!=nonuaptests" @@ -227,48 +321,71 @@ $(TestCommand.Replace($([System.Environment]::NewLine), " ")) - + - + - - + + $(DotnetPath)dotnet test "@(ManualTestsProj)" --no-build -v n -p:Configuration=$(Configuration) - -p:Target$(TFGroup)Version=$(TF) - -p:ReferenceType=$(ReferenceType) + -p:TargetsNetFx=true + -p:TF=$(TF) -p:TestSet=$(TestSet) - -p:TestTargetOS=Windows$(TargetGroup) + -p:ReferenceType=$(ReferenceType) --collect "Code coverage" --results-directory $(ResultsDirectory) - --filter "category!=non$(TargetGroup)tests&category!=failing&category!=nonwindowstests" - --logger:"trx;LogFilePrefix=Manual-Windows$(TargetGroup)-$(TestSet)" + --filter "category!=nonnetfxtests&category!=failing&category!=nonwindowstests" + --logger:"trx;LogFilePrefix=Manual-Windowsnetfx-$(TestSet)" $(TestCommand.Replace($([System.Environment]::NewLine), " ")) - + - - + + $(DotnetPath)dotnet test "@(ManualTestsProj)" --no-build -v n -p:Configuration=$(Configuration) - -p:TargetNetCoreVersion=$(TF) + -p:TF=$(TF) + -p:TestSet=$(TestSet) -p:ReferenceType=$(ReferenceType) + --collect "Code coverage" + --results-directory $(ResultsDirectory) + --filter "category!=nonnetcoreapptests&category!=failing&category!=nonwindowstests" + --logger:"trx;LogFilePrefix=Manual-Windowsnetcoreapp-$(TestSet)" + + $(TestCommand.Replace($([System.Environment]::NewLine), " ")) + + + + + + + + + + $(DotnetPath)dotnet test "@(ManualTestsProj)" + --no-build + -v n + -p:Configuration=$(Configuration) + -p:TF=$(TF) -p:TestSet=$(TestSet) - -p:TestTargetOS=Unixnetcoreapp + -p:ReferenceType=$(ReferenceType) --collect "Code coverage" --results-directory $(ResultsDirectory) --filter "category!=nonnetcoreapptests&category!=failing&category!=nonlinuxtests&category!=nonuaptests" @@ -276,7 +393,7 @@ $(TestCommand.Replace($([System.Environment]::NewLine), " ")) - + @@ -289,64 +406,132 @@ - - - - - - - - + + + + - $(CI);TestTargetOS=$(TestOS)netfx;Platform=AnyCPU;$(ProjectProperties);$(NugetPackProperties) + $(CI);Platform=AnyCPU;$(ProjectProperties);$(NugetPackProperties);TargetsNetFx=true + + + + - + + + + $(CI);Platform=AnyCPU;$(ProjectProperties) + + + + - $(CI);TestTargetOS=$(TestOS)netcoreapp;$(ProjectProperties);Platform=AnyCPU;OSGroup=Unix; + $(CI);Platform=AnyCPU;$(ProjectProperties);OSGroup=Unix; - + - $(CI);TestTargetOS=$(TestOS)netcoreapp;$(ProjectProperties);Platform=AnyCPU;OSGroup=Windows_NT + $(CI);Platform=AnyCPU;$(ProjectProperties);OSGroup=Windows_NT - + - $(CI);TestTargetOS=$(TestOS)netcoreapp;$(ProjectProperties);Platform=AnyCPU;OSGroup=AnyOS; + $(CI);Platform=AnyCPU;$(ProjectProperties);OSGroup=AnyOS; - + - - - - + - - - + + + + + $(CI);$(ProjectProperties);TargetsNetFx=true + + + + + + $(CI);Platform=AnyCPU;$(ProjectProperties);$(NugetPackProperties);TargetsNetFx=true + + + + + + + $(CI);Platform=$(Platform);$(ProjectProperties);$(NugetPackProperties);TargetsNetFx=true;ReferenceType=Package + + + - - - - - - - - + + + + + $(CI);$(ProjectProperties) + + + + + + $(CI);Platform=AnyCPU;$(ProjectProperties) + + + + + + + $(CI);Platform=$(Platform);$(ProjectProperties);ReferenceType=Package + + + - - - - - + + + + $(CI);Platform=AnyCPU;OSGroup=Windows_NT;$(ProjectProperties) + + + + + + + $(CI);Platform=AnyCPU;OSGroup=Unix;$(ProjectProperties) + + + + + + + $(CI);Platform=AnyCPU;OSGroup=AnyOS;$(ProjectProperties) + + + diff --git a/eng/pipelines/common/templates/jobs/validate-signed-package-job.yml b/eng/pipelines/common/templates/jobs/validate-signed-package-job.yml index 3560e6a564..ebe0140d9f 100644 --- a/eng/pipelines/common/templates/jobs/validate-signed-package-job.yml +++ b/eng/pipelines/common/templates/jobs/validate-signed-package-job.yml @@ -340,7 +340,7 @@ jobs: displayName: 'Modify TestMicrosoftDataSqlClientVersion' - powershell: | - #Change TestMicrosoftDataSqlClientVersion + #Check AssemblyFileVersion [Xml] $versionprops = Get-Content -Path "tools/props/Versions.props" $AssemblyFileVersion = $versionprops.Project.PropertyGroup[0].AssemblyFileVersion diff --git a/eng/pipelines/common/templates/steps/build-all-tests-step.yml b/eng/pipelines/common/templates/steps/build-all-tests-step.yml index 826be1df8b..bdb3d008d1 100644 --- a/eng/pipelines/common/templates/steps/build-all-tests-step.yml +++ b/eng/pipelines/common/templates/steps/build-all-tests-step.yml @@ -42,16 +42,6 @@ steps: configuration: '${{parameters.configuration }}' msbuildArguments: '-t:BuildTestsNetFx -p:TF=${{parameters.targetFramework }} -p:TestSet=${{parameters.testSet }} -p:ReferenceType=${{parameters.referenceType }} -p:TestMicrosoftDataSqlClientVersion=${{parameters.nugetPackageVersion }}' -# - ${{else if contains(parameters.targetFramework, 'netstandard')}}: # .NET Standard -# - task: MSBuild@1 -# displayName: 'Build Tests NetStandard' -# inputs: -# solution: build.proj -# platform: '${{parameters.platform }}' -# configuration: '${{parameters.configuration }}' -# msbuildArguments: '-t:BuildTestsNetCore -p:ReferenceType=NetStandard -p:TargetNetStandardVersion=${{parameters.targetNetStandardVersion }} -p:TF=${{parameters.targetFramework }} -p:ReferenceType=${{parameters.referenceType }} -p:TestMicrosoftDataSqlClientVersion=${{parameters.nugetPackageVersion }}' -# condition: and(succeeded(), not(startsWith(variables['TF'], 'net4')), startsWith(variables['TargetNetStandardVersion'], 'netstandard')) - - ${{elseif eq(parameters.OSGroup, '')}}: # .NET on Windows - task: MSBuild@1 displayName: 'Build Tests NetCore [Win]' 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 f747fa57e6..1a0da4790f 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 @@ -30,14 +30,6 @@ parameters: type: boolean default: false - - name: TestTargetOS - type: string - default: Windowsnetcoreapp - values: - - Windowsnetfx - - Windowsnetcoreapp - - Unixnetcoreapp - - name: retryCountOnManualTests type: number default: 2 @@ -55,26 +47,26 @@ steps: inputs: solution: build.proj msbuildArchitecture: x64 - msbuildArguments: '-p:Configuration=${{parameters.configuration }} -t:BuildAKVNetCore -p:ReferenceType=${{parameters.referenceType }} ' + msbuildArguments: '-p:Configuration=${{parameters.configuration }} -t:BuildAKVNetCore -p:ReferenceType=${{parameters.referenceType }} -p:TestMicrosoftDataSqlClientVersion=${{parameters.NugetPackageVersion }} ' - 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:TestMicrosoftDataSqlClientVersion=${{parameters.NugetPackageVersion }} -p:Configuration=${{parameters.configuration }}' + msbuildArguments: '-t:BuildTestsNetCore -p:ReferenceType=${{parameters.referenceType }} -p:TF=${{parameters.TargetNetCoreVersion }} -p:TestMicrosoftDataSqlClientVersion=${{parameters.NugetPackageVersion }} -p:Configuration=${{parameters.configuration }}' - task: DotNetCoreCLI@2 displayName: 'Run Functional Tests for ${{parameters.TargetNetCoreVersion }}' inputs: command: test projects: 'src\Microsoft.Data.SqlClient\tests\FunctionalTests\Microsoft.Data.SqlClient.Tests.csproj' - arguments: '-p:Platform=${{parameters.platform }} -p:TestTargetOS="${{parameters.TestTargetOS }}" -p:TargetNetCoreVersion=${{parameters.TargetNetCoreVersion }} -p:ReferenceType=${{parameters.referenceType }} -p:Configuration=${{parameters.configuration }} -p:TestMicrosoftDataSqlClientVersion=${{parameters.NugetPackageVersion }} --no-build -v n --filter "category!=nonnetcoreapptests&category!=failing&category!=nonwindowstests"' + arguments: '-p:Platform=${{parameters.platform }} -p:TF=${{parameters.TargetNetCoreVersion }} -p:ReferenceType=${{parameters.referenceType }} -p:Configuration=${{parameters.configuration }} -p:TestMicrosoftDataSqlClientVersion=${{parameters.NugetPackageVersion }} --no-build -v n --filter "category!=nonnetcoreapptests&category!=failing&category!=nonwindowstests"' - task: DotNetCoreCLI@2 displayName: 'Run Manual Tests for ${{parameters.TargetNetCoreVersion }}' inputs: command: test projects: 'src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj' - arguments: '-p:Platform=${{parameters.platform }} -p:TestTargetOS="${{parameters.TestTargetOS }}" -p:TargetNetCoreVersion=${{parameters.TargetNetCoreVersion }} -p:ReferenceType=${{parameters.referenceType }} -p:Configuration=${{parameters.configuration }} -p:TestMicrosoftDataSqlClientVersion=${{parameters.NugetPackageVersion }} --no-build -v n --filter category!=nonnetcoreapptests&category!=failing&category!=nonwindowstests --collect "Code Coverage"' + arguments: '-p:Platform=${{parameters.platform }} -p:TF=${{parameters.TargetNetCoreVersion }} -p:ReferenceType=${{parameters.referenceType }} -p:Configuration=${{parameters.configuration }} -p:TestMicrosoftDataSqlClientVersion=${{parameters.NugetPackageVersion }} --no-build -v n --filter category!=nonnetcoreapptests&category!=failing&category!=nonwindowstests --collect "Code Coverage"' retryCountOnTaskFailure: ${{parameters.retryCountOnManualTests }} 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 ab77af3ee9..43c63cd362 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 @@ -30,14 +30,6 @@ parameters: type: boolean default: false - - name: TestTargetOS - type: string - default: Windowsnetfx - values: - - Windowsnetfx - - Windowsnetcoreapp - - Unixnetcoreapp - - name: retryCountOnManualTests type: number default: 2 @@ -55,25 +47,25 @@ steps: inputs: solution: build.proj msbuildArchitecture: x64 - msbuildArguments: '-p:Configuration=${{parameters.configuration }} -t:BuildAKVNetFx -p:ReferenceType=${{parameters.referenceType }} ' + msbuildArguments: '-p:Configuration=${{parameters.configuration }} -t:BuildAKVNetFx -p:ReferenceType=${{parameters.referenceType }} -p:TestMicrosoftDataSqlClientVersion=${{parameters.NugetPackageVersion }}' - task: MSBuild@1 displayName: 'MSBuild Build Tests for ${{parameters.TargetNetFxVersion }}' inputs: solution: build.proj - msbuildArguments: ' -t:BuildTestsNetFx -p:ReferenceType=${{parameters.referenceType }} -p:TestMicrosoftDataSqlClientVersion=${{parameters.NugetPackageVersion }} -p:TargetNetFxVersion=${{parameters.TargetNetFxVersion }} -p:Configuration=${{parameters.configuration }} -p:Platform=${{parameters.platform }}' + msbuildArguments: ' -t:BuildTestsNetFx -p:ReferenceType=${{parameters.referenceType }} -p:TestMicrosoftDataSqlClientVersion=${{parameters.NugetPackageVersion }} -p:TF=${{parameters.TargetNetFxVersion }} -p:Configuration=${{parameters.configuration }} -p:Platform=${{parameters.platform }}' - task: DotNetCoreCLI@2 displayName: 'Run Functional Tests for ${{parameters.TargetNetFxVersion }}' inputs: command: test projects: 'src\Microsoft.Data.SqlClient\tests\FunctionalTests\Microsoft.Data.SqlClient.Tests.csproj' - arguments: '-p:Platform=${{parameters.platform }} -p:TestTargetOS="${{parameters.TestTargetOS }}" -p:TargetNetFxVersion=${{parameters.TargetNetFxVersion }} -p:ReferenceType=${{parameters.referenceType }} -p:Configuration=${{parameters.configuration }} -p:TestMicrosoftDataSqlClientVersion=${{parameters.NugetPackageVersion }} --no-build -v n --filter "category!=nonnetfxtests&category!=failing&category!=nonwindowstests" --collect "Code Coverage"' + arguments: '-p:Platform=${{parameters.platform }} -p:TF=${{parameters.TargetNetFxVersion }} -p:ReferenceType=${{parameters.referenceType }} -p:Configuration=${{parameters.configuration }} -p:TestMicrosoftDataSqlClientVersion=${{parameters.NugetPackageVersion }} --no-build -v n --filter "category!=nonnetfxtests&category!=failing&category!=nonwindowstests" --collect "Code Coverage"' - task: DotNetCoreCLI@2 displayName: 'Run Manual Tests for ${{parameters.TargetNetFxVersion }}' inputs: command: test projects: 'src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj' - arguments: '-p:Platform=${{parameters.platform }} -p:TestTargetOS="${{parameters.TestTargetOS }}" -p:TargetNetFxVersion=${{parameters.TargetNetFxVersion }} -p:ReferenceType=${{parameters.referenceType }} -p:Configuration=${{parameters.configuration }} -p:TestMicrosoftDataSqlClientVersion=${{parameters.NugetPackageVersion }} --no-build -v n --filter "category!=nonnetfxtests&category!=failing&category!=nonwindowstests" --collect "Code Coverage"' + arguments: '-p:Platform=${{parameters.platform }} -p:TF=${{parameters.TargetNetFxVersion }} -p:ReferenceType=${{parameters.referenceType }} -p:Configuration=${{parameters.configuration }} -p:TestMicrosoftDataSqlClientVersion=${{parameters.NugetPackageVersion }} --no-build -v n --filter "category!=nonnetfxtests&category!=failing&category!=nonwindowstests" --collect "Code Coverage"' retryCountOnTaskFailure: ${{parameters.retryCountOnManualTests }} diff --git a/eng/pipelines/common/templates/steps/ci-project-build-step.yml b/eng/pipelines/common/templates/steps/ci-project-build-step.yml index e938c909fd..c46e412116 100644 --- a/eng/pipelines/common/templates/steps/ci-project-build-step.yml +++ b/eng/pipelines/common/templates/steps/ci-project-build-step.yml @@ -18,12 +18,12 @@ parameters: - name: operatingSystem type: string - default: deferedToRuntime + default: deferredToRuntime values: - Windows - Linux - MacOS - - deferedToRuntime + - deferredToRuntime - name: build type: string @@ -45,7 +45,7 @@ steps: packageType: 'runtime' version: '8.0' -- ${{ if or(eq(parameters.operatingSystem, 'Windows'), eq(parameters.operatingSystem, 'deferedToRuntime')) }}: +- ${{ if or(eq(parameters.operatingSystem, 'Windows'), eq(parameters.operatingSystem, 'deferredToRuntime')) }}: - ${{ if or(eq(parameters.build, 'MDS'), eq(parameters.build, 'all'), eq(parameters.build, 'allNoDocs')) }}: - task: MSBuild@1 displayName: 'Restore nugets [Win]' @@ -91,6 +91,14 @@ steps: configuration: '${{ parameters.configuration }}' msbuildArguments: '-t:BuildAKVNetFx -p:BuildNumber=${{ parameters.buildNumber }}' + # - task: DotNetCoreCLI@2 + # displayName: 'Build AKV Provider NetFx (dotnet) [Win]' + # condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT')) + # inputs: + # command: build + # projects: build.proj + # arguments: '-t:BuildAKVNetFx -p:Platform=${{ parameters.platform }} -p:Configuration=${{ parameters.configuration }} -p:BuildNumber=${{ parameters.buildNumber }} -v detailed --no-restore' + - task: MSBuild@1 displayName: 'Build AKV Provider NetCore All OS [Win]' condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT')) @@ -101,7 +109,7 @@ steps: configuration: '${{ parameters.configuration }}' msbuildArguments: '-t:BuildAKVNetCoreAllOS -p:BuildNumber=${{ parameters.buildNumber }}' -- ${{ if or(eq(parameters.operatingSystem, 'Linux'), eq(parameters.operatingSystem, 'MacOS'), eq(parameters.operatingSystem, 'deferedToRuntime')) }}: +- ${{ if or(eq(parameters.operatingSystem, 'Linux'), eq(parameters.operatingSystem, 'MacOS'), eq(parameters.operatingSystem, 'deferredToRuntime')) }}: - task: DotNetCoreCLI@2 displayName: 'Build Driver [non-Win]' condition: and(succeeded(), ne(variables['Agent.OS'], 'Windows_NT')) diff --git a/eng/pipelines/common/templates/steps/copy-dlls-for-test-step.yml b/eng/pipelines/common/templates/steps/copy-dlls-for-test-step.yml index 098286866c..877b7a28f2 100644 --- a/eng/pipelines/common/templates/steps/copy-dlls-for-test-step.yml +++ b/eng/pipelines/common/templates/steps/copy-dlls-for-test-step.yml @@ -17,10 +17,10 @@ parameters: default: software - name: referenceType - default: project + default: Project values: - - project - - package + - Project + - Package - name: listOfTF type: object diff --git a/eng/pipelines/common/templates/steps/generate-nuget-package-step.yml b/eng/pipelines/common/templates/steps/generate-nuget-package-step.yml index 4e32f989c3..68d86258ec 100644 --- a/eng/pipelines/common/templates/steps/generate-nuget-package-step.yml +++ b/eng/pipelines/common/templates/steps/generate-nuget-package-step.yml @@ -33,10 +33,10 @@ parameters: default: true - name: referenceType - default: project + default: Project values: - - project - - package + - Project + - Package steps: - ${{ if parameters.installNuget }}: diff --git a/eng/pipelines/common/templates/steps/publish-symbols-step.yml b/eng/pipelines/common/templates/steps/publish-symbols-step.yml index 52e622d9a3..9cc84f063e 100644 --- a/eng/pipelines/common/templates/steps/publish-symbols-step.yml +++ b/eng/pipelines/common/templates/steps/publish-symbols-step.yml @@ -36,10 +36,10 @@ parameters: public: true - name: referenceType - default: project + default: Project values: - - project - - package + - Project + - Package - name: product default: MDS diff --git a/eng/pipelines/common/templates/steps/run-all-tests-step.yml b/eng/pipelines/common/templates/steps/run-all-tests-step.yml index f0eb2eff66..944dd11748 100644 --- a/eng/pipelines/common/templates/steps/run-all-tests-step.yml +++ b/eng/pipelines/common/templates/steps/run-all-tests-step.yml @@ -60,10 +60,16 @@ steps: msbuildArchitecture: ${{parameters.msbuildArchitecture }} platform: '${{parameters.platform }}' configuration: '${{parameters.configuration }}' - ${{ if eq(parameters.msbuildArchitecture, 'x64') }}: - msbuildArguments: '-t:RunFunctionalTests -p:TF=${{parameters.targetFramework }} -p:TestSet=${{parameters.testSet }} -p:ReferenceType=${{parameters.referenceType }} -p:TestMicrosoftDataSqlClientVersion=${{parameters.nugetPackageVersion }}' + ${{ if eq(parameters.msbuildArchitecture, 'x64') }}: + ${{ if contains(parameters.targetFramework, 'net4') }}: + msbuildArguments: '-t:RunFunctionalTestsWindowsNetFx -p:TF=${{parameters.targetFramework }} -p:TestSet=${{parameters.testSet }} -p:ReferenceType=${{parameters.referenceType }} -p:TestMicrosoftDataSqlClientVersion=${{parameters.nugetPackageVersion }}' + ${{ else }}: + msbuildArguments: '-t:RunFunctionalTestsWindows -p:TF=${{parameters.targetFramework }} -p:TestSet=${{parameters.testSet }} -p:ReferenceType=${{parameters.referenceType }} -p:TestMicrosoftDataSqlClientVersion=${{parameters.nugetPackageVersion }}' ${{ else }}: # x86 - msbuildArguments: '-t:RunFunctionalTests -p:TF=${{parameters.targetFramework }} -p:TestSet=${{parameters.testSet }} -p:ReferenceType=${{parameters.referenceType }} -p:TestMicrosoftDataSqlClientVersion=${{parameters.nugetPackageVersion }} -p:DotnetPath=${{parameters.dotnetx86RootPath }}' + ${{ if contains(parameters.targetFramework, 'net4') }}: + msbuildArguments: '-t:RunFunctionalTestsWindowsNetFx -p:TF=${{parameters.targetFramework }} -p:TestSet=${{parameters.testSet }} -p:ReferenceType=${{parameters.referenceType }} -p:TestMicrosoftDataSqlClientVersion=${{parameters.nugetPackageVersion }} -p:DotnetPath=${{parameters.dotnetx86RootPath }}' + ${{ else }}: + msbuildArguments: '-t:RunFunctionalTestsWindows -p:TF=${{parameters.targetFramework }} -p:TestSet=${{parameters.testSet }} -p:ReferenceType=${{parameters.referenceType }} -p:TestMicrosoftDataSqlClientVersion=${{parameters.nugetPackageVersion }} -p:DotnetPath=${{parameters.dotnetx86RootPath }}' condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT')) retryCountOnTaskFailure: 1 @@ -75,9 +81,15 @@ steps: platform: '${{parameters.platform }}' configuration: '${{parameters.configuration }}' ${{ if eq(parameters.msbuildArchitecture, 'x64') }}: - msbuildArguments: '-t:RunManualTests -p:TF=${{parameters.targetFramework }} -p:TestSet=${{parameters.testSet }} -p:ReferenceType=${{parameters.referenceType }} -p:TestMicrosoftDataSqlClientVersion=${{parameters.nugetPackageVersion }}' + ${{ if contains(parameters.targetFramework, 'net4') }}: + msbuildArguments: '-t:RunManualTestsWindowsNetFx -p:TF=${{parameters.targetFramework }} -p:TestSet=${{parameters.testSet }} -p:ReferenceType=${{parameters.referenceType }} -p:TestMicrosoftDataSqlClientVersion=${{parameters.nugetPackageVersion }}' + ${{ else }}: + msbuildArguments: '-t:RunManualTestsWindows -p:TF=${{parameters.targetFramework }} -p:TestSet=${{parameters.testSet }} -p:ReferenceType=${{parameters.referenceType }} -p:TestMicrosoftDataSqlClientVersion=${{parameters.nugetPackageVersion }}' ${{ else }}: # x86 - msbuildArguments: '-t:RunManualTests -p:TF=${{parameters.targetFramework }} -p:TestSet=${{parameters.testSet }} -p:ReferenceType=${{parameters.referenceType }} -p:TestMicrosoftDataSqlClientVersion=${{parameters.nugetPackageVersion }} -p:DotnetPath=${{parameters.dotnetx86RootPath }}' + ${{ if contains(parameters.targetFramework, 'net4') }}: + msbuildArguments: '-t:RunManualTestsWindowsNetFx -p:TF=${{parameters.targetFramework }} -p:TestSet=${{parameters.testSet }} -p:ReferenceType=${{parameters.referenceType }} -p:TestMicrosoftDataSqlClientVersion=${{parameters.nugetPackageVersion }} -p:DotnetPath=${{parameters.dotnetx86RootPath }}' + ${{ else }}: + msbuildArguments: '-t:RunManualTestsWindows -p:TF=${{parameters.targetFramework }} -p:TestSet=${{parameters.testSet }} -p:ReferenceType=${{parameters.referenceType }} -p:TestMicrosoftDataSqlClientVersion=${{parameters.nugetPackageVersion }} -p:DotnetPath=${{parameters.dotnetx86RootPath }}' condition: eq(variables['Agent.OS'], 'Windows_NT') retryCountOnTaskFailure: 2 @@ -88,7 +100,7 @@ steps: command: custom projects: build.proj custom: msbuild - arguments: '-t:RunFunctionalTests -p:TF=${{parameters.targetFramework }} -p:TestSet=${{parameters.testSet }} -p:ReferenceType=${{parameters.referenceType }} -p:TestMicrosoftDataSqlClientVersion=${{parameters.nugetPackageVersion }} -p:platform=${{parameters.platform }} -p:Configuration=${{parameters.configuration }}' + arguments: '-t:RunFunctionalTestsUnix -p:TF=${{parameters.targetFramework }} -p:TestSet=${{parameters.testSet }} -p:ReferenceType=${{parameters.referenceType }} -p:TestMicrosoftDataSqlClientVersion=${{parameters.nugetPackageVersion }} -p:platform=${{parameters.platform }} -p:Configuration=${{parameters.configuration }}' verbosityRestore: Detailed verbosityPack: Detailed retryCountOnTaskFailure: 1 @@ -100,7 +112,7 @@ steps: command: custom projects: build.proj custom: msbuild - arguments: '-t:RunManualTests -p:TF=${{parameters.targetFramework }} -p:TestSet=${{parameters.testSet }} -p:ReferenceType=${{parameters.referenceType }} -p:TestMicrosoftDataSqlClientVersion=${{parameters.nugetPackageVersion }} -p:platform=${{parameters.platform }} -p:Configuration=${{parameters.configuration }}' + arguments: '-t:RunManualTestsUnix -p:TF=${{parameters.targetFramework }} -p:TestSet=${{parameters.testSet }} -p:ReferenceType=${{parameters.referenceType }} -p:TestMicrosoftDataSqlClientVersion=${{parameters.nugetPackageVersion }} -p:platform=${{parameters.platform }} -p:Configuration=${{parameters.configuration }}' verbosityRestore: Detailed verbosityPack: Detailed retryCountOnTaskFailure: 2 diff --git a/eng/pipelines/common/templates/steps/update-nuget-config-local-feed-step.yml b/eng/pipelines/common/templates/steps/update-nuget-config-local-feed-step.yml index 6f5a528345..824e276e82 100644 --- a/eng/pipelines/common/templates/steps/update-nuget-config-local-feed-step.yml +++ b/eng/pipelines/common/templates/steps/update-nuget-config-local-feed-step.yml @@ -54,36 +54,36 @@ steps: arguments: 'build.proj -t:restore' feedsToUse: 'select' -- powershell: | - $Doc = [xml](Get-Content "./Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider.csproj") - $parent_xpath = '/Project/ItemGroup/ProjectReference' - $node = $Doc.SelectSingleNode($parent_xpath) - $parentNode = $node.ParentNode - while($node -ne $null) { - $node.ParentNode.RemoveChild($node) - $node = $Doc.SelectSingleNode($parent_xpath) - } +# - powershell: | +# $Doc = [xml](Get-Content "./Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider.csproj") +# $parent_xpath = '/Project/ItemGroup/ProjectReference' +# $node = $Doc.SelectSingleNode($parent_xpath) +# $parentNode = $node.ParentNode +# while($node -ne $null) { +# $node.ParentNode.RemoveChild($node) +# $node = $Doc.SelectSingleNode($parent_xpath) +# } - $parent_xpath = '/Project/ItemGroup/PackageReference[@Include="Microsoft.Data.SqlClient"]' - $node = $Doc.SelectSingleNode($parent_xpath) +# $parent_xpath = '/Project/ItemGroup/PackageReference[@Include="Microsoft.Data.SqlClient"]' +# $node = $Doc.SelectSingleNode($parent_xpath) - if($node -ne $null){ - $node.Version="${{parameters.nugetPackageVersion }}" - } - else{ - $packagerefnode = $doc.createelement("packagereference") - $value = $doc.selectsinglenode('/project/itemgroup/projectreference') - $attrinclude = $doc.createattribute("include") - $attrinclude.value = "microsoft.data.sqlclient" - $attrversion = $doc.createattribute("version") - $attrversion.value = "${{parameters.nugetPackageVersion }}" - $packagerefnode.attributes.append($attrinclude) - $packagerefnode.attributes.append($attrversion) - $parentNode.AppendChild($packageRefNode) - } +# if($node -ne $null){ +# $node.Version="${{parameters.nugetPackageVersion }}" +# } +# else{ +# $packagerefnode = $doc.createelement("packagereference") +# $value = $doc.selectsinglenode('/project/itemgroup/projectreference') +# $attrinclude = $doc.createattribute("include") +# $attrinclude.value = "microsoft.data.sqlclient" +# $attrversion = $doc.createattribute("version") +# $attrversion.value = "${{parameters.nugetPackageVersion }}" +# $packagerefnode.attributes.append($attrinclude) +# $packagerefnode.attributes.append($attrversion) +# $parentNode.AppendChild($packageRefNode) +# } - $currentFolder = Get-Location - $filePath = Join-Path $currentFolder "Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider.csproj" - $Doc.Save($filePath) - workingDirectory: 'src/Microsoft.Data.SqlClient/add-ons/AzureKeyVaultProvider' - displayName: 'Update AKV Project Ref to Package Ref (.NET Framework/Core)' +# $currentFolder = Get-Location +# $filePath = Join-Path $currentFolder "Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider.csproj" +# $Doc.Save($filePath) +# workingDirectory: 'src/Microsoft.Data.SqlClient/add-ons/AzureKeyVaultProvider' +# displayName: 'Update AKV Project Ref to Package Ref (.NET Framework/Core)' diff --git a/eng/pipelines/jobs/build-akv-official-job.yml b/eng/pipelines/jobs/build-akv-official-job.yml index a4374b773b..09301feee5 100644 --- a/eng/pipelines/jobs/build-akv-official-job.yml +++ b/eng/pipelines/jobs/build-akv-official-job.yml @@ -123,7 +123,7 @@ jobs: packageVersion: '${{ parameters.nugetPackageVersion }}' nuspecPath: '$(REPO_ROOT)/tools/specs/add-ons/$(PACKAGE_NAME).nuspec' outputDirectory: '$(ARTIFACT_PATH)' - referenceType: 'Package' + referenceType: Package - template: ../steps/compound-esrp-code-signing-step.yml@self parameters: @@ -146,7 +146,7 @@ jobs: publishToInternal: true publishToPublic: true publishTokenUri: '${{ parameters.symbolsPublishTokenUri }}' - referenceType: 'Package' + referenceType: Package searchPattern: | Windows_NT/${{ parameters.buildConfiguration }}.AnyCPU/AzureKeyVaultProvider/**/$(PACKAGE_NAME).pdb AnyOS/${{ parameters.buildConfiguration }}.AnyCPU/AzureKeyVaultProvider/**/$(PACKAGE_NAME).pdb diff --git a/eng/pipelines/libraries/ci-build-variables.yml b/eng/pipelines/libraries/ci-build-variables.yml index 122281e083..a6b595fdb7 100644 --- a/eng/pipelines/libraries/ci-build-variables.yml +++ b/eng/pipelines/libraries/ci-build-variables.yml @@ -9,10 +9,15 @@ variables: - group: 'ADO CI Packaging' - group: 'ADO Test Configuration Properties' + # Explicitly unset the TF variable inherited from the 'ADO Build properties' + # library. It is not necessary for CI builds any more. + # + # TODO: Remove TF from the 'ADO Build properties' library. + - name: TF + value: '' + - name: buildNumber value: '$(Build.BuildNumber)' - - name: TFNetCore - value: 'net8.0' - name: SQLTarget value: 'localhost' - name: NugetPackageVersion diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 0ff2beb10e..9246f15176 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -12,14 +12,15 @@ - Project + Project $(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb @@ -57,7 +58,6 @@ $(Artifacts)bin\AnyOS\ $(Artifacts)bin\Unix\ $(RepoRoot)tools\ - $(ToolsDir)GenAPI\ $(RepoRoot)packages\ $(RepoRoot).nuget\ $(NuGetRoot)nuget.exe @@ -85,7 +85,7 @@ all - + portable true @@ -133,4 +133,22 @@ Condition="'$([MSBuild]::GetTargetFrameworkIdentifier($(TargetFramework)))' != '.NETCoreApp'"> 13.0 + + + + + all + runtime; build; native; contentfiles; analyzers + + 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 294a5c02b2..ead932af34 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 @@ -4,8 +4,6 @@ Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider AzureKeyVaultProvider {9073ABEF-92E0-4702-BB23-2C99CEF9BDD7} - netcoreapp - netfx Debug;Release; AnyCPU;x86;x64 $(ObjFolder)$(Configuration).$(Platform)\$(AddOnName) @@ -31,15 +29,30 @@ - - - - - + + + + + + + + + + + + + + + + + + + + diff --git a/src/Microsoft.Data.SqlClient/add-ons/Directory.Build.props b/src/Microsoft.Data.SqlClient/add-ons/Directory.Build.props index 7776439adc..d8b464ddc6 100644 --- a/src/Microsoft.Data.SqlClient/add-ons/Directory.Build.props +++ b/src/Microsoft.Data.SqlClient/add-ons/Directory.Build.props @@ -1,42 +1,47 @@ - - + + - $(OS) - true - true - Project $(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb true $([System.IO.Path]::Combine('$(IntermediateOutputPath)','$(TargetFramework)','$(TargetFrameworkMoniker).AssemblyAttributes$(DefaultLanguageSourceExtension)')) - - - net462 - net8.0;net9.0 - - + + + net462 + net8.0;net9.0 + + - - + + - $(TargetNetCoreVersion);$(TargetNetFxVersion) - $(TargetNetCoreVersion) + $(TF) - + + + + $(NetTargets) + $(NetFxTargets) + + + - net8.0;net9.0 - net462 + $(NetFxTargets);$(NetTargets) + diff --git a/src/Microsoft.Data.SqlClient/netcore/ref/Microsoft.Data.SqlClient.csproj b/src/Microsoft.Data.SqlClient/netcore/ref/Microsoft.Data.SqlClient.csproj index b587305bb5..11ec0b6396 100644 --- a/src/Microsoft.Data.SqlClient/netcore/ref/Microsoft.Data.SqlClient.csproj +++ b/src/Microsoft.Data.SqlClient/netcore/ref/Microsoft.Data.SqlClient.csproj @@ -7,7 +7,6 @@ $(OutputPath)\$(TargetFramework)\Microsoft.Data.SqlClient.xml Core $(BaseProduct) Debug;Release; - netcoreapp AnyCPU;x64;x86 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 62d35ab21a..91a59838a9 100644 --- a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj +++ b/src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj @@ -8,7 +8,6 @@ true false - netcoreapp Debug;Release; AnyCPU;x64;x86 $(ObjFolder)$(Configuration).$(Platform)\$(AssemblyName)\netcore\ diff --git a/src/Microsoft.Data.SqlClient/netfx/ref/Microsoft.Data.SqlClient.csproj b/src/Microsoft.Data.SqlClient/netfx/ref/Microsoft.Data.SqlClient.csproj index 77c7d66903..55a3386bd5 100644 --- a/src/Microsoft.Data.SqlClient/netfx/ref/Microsoft.Data.SqlClient.csproj +++ b/src/Microsoft.Data.SqlClient/netfx/ref/Microsoft.Data.SqlClient.csproj @@ -1,7 +1,7 @@  false - net462 + net462 $(ObjFolder)$(Configuration)\$(AssemblyName)\ref\ $(BinFolder)$(Configuration)\$(AssemblyName)\ref\ $(OutputPath)\Microsoft.Data.SqlClient.xml diff --git a/src/Microsoft.Data.SqlClient/netfx/src/Microsoft.Data.SqlClient.csproj b/src/Microsoft.Data.SqlClient/netfx/src/Microsoft.Data.SqlClient.csproj index 52767110a0..cfd6a495ab 100644 --- a/src/Microsoft.Data.SqlClient/netfx/src/Microsoft.Data.SqlClient.csproj +++ b/src/Microsoft.Data.SqlClient/netfx/src/Microsoft.Data.SqlClient.csproj @@ -1,8 +1,8 @@ - + {407890AC-9876-4FEF-A6F1-F36A876BAADE} - net462 + net462 true Microsoft.Data.SqlClient AnyCPU @@ -55,7 +55,10 @@ True True None - MinimumRecommendedRules.ruleset + + + MinimumRecommendedRules.ruleset + True True $(DefineConstants);USEOFFSET;CODE_ANALYSIS_BASELINE;FEATURE_LEGACYSURFACEAREA;FEATURE_UTF32;FEATURE_UTF7;TRACE; @@ -759,8 +762,8 @@ Microsoft\Data\SqlClient\SqlInternalTransaction.cs - - Microsoft\Data\SqlClient\SqlMetaDataFactory.cs + + Microsoft\Data\SqlClient\SqlMetadataFactory.cs Microsoft\Data\SqlClient\SqlNotificationEventArgs.cs @@ -904,7 +907,7 @@ - + @@ -958,17 +961,6 @@ PreserveNewest - - - {5477469E-83B1-11D2-8B49-00A0C9B7C9C4} - 2 - 4 - 0 - tlbimp - False - True - - diff --git a/src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/Common/DBConnectionString.cs b/src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/Common/DbConnectionString.cs similarity index 100% rename from src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/Common/DBConnectionString.cs rename to src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/Common/DbConnectionString.cs diff --git a/src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/Server/SmiEventSink_DeferedProcessing.cs b/src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/Server/SmiEventSink_DeferredProcessing.cs similarity index 81% rename from src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/Server/SmiEventSink_DeferedProcessing.cs rename to src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/Server/SmiEventSink_DeferredProcessing.cs index c777fd470e..8dc0074c54 100644 --- a/src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/Server/SmiEventSink_DeferedProcessing.cs +++ b/src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/Server/SmiEventSink_DeferredProcessing.cs @@ -12,7 +12,7 @@ namespace Microsoft.Data.SqlClient.Server // Main example: // SqlCommand.ExecuteNonQuerySmi calls EventStream.ProcessEvent with it's command event sink (CES) // ProcessEvent calls OnParametersAvailable on the CES - // OnParametersAvailable sets up a deferedprocessing event sink (DPES) with the CES as its parent + // OnParametersAvailable sets up a deferred processing event sink (DPES) with the CES as its parent // OnParametersAvailable calls ValueUtils to extract param values passing the DPES // ValueUtils calls Smi passing DPES // Smi may call MessagePosted, which will send a message up the sink parent chain and save it. @@ -21,11 +21,11 @@ namespace Microsoft.Data.SqlClient.Server // SqlCommand.ExecuteNonQuerySmi calls CES.ProcessMessagesAndThrow, which handles the messages // sent from the Smi value extraction code. // - // IMPORTANT: Code that uses the DeferedProccess event sink is responsible for ensuring that + // IMPORTANT: Code that uses the DeferredProccessing event sink is responsible for ensuring that // these messages ARE processed at some point. - internal class SmiEventSink_DeferedProcessing : SmiEventSink_Default + internal class SmiEventSink_DeferredProcessing : SmiEventSink_Default { - internal SmiEventSink_DeferedProcessing(SmiEventSink parent) : base(parent) + internal SmiEventSink_DeferredProcessing(SmiEventSink parent) : base(parent) { } diff --git a/src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/SqlCommand.cs b/src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/SqlCommand.cs index c4c49a9cf2..70d9f72ebc 100644 --- a/src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/SqlCommand.cs +++ b/src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/SqlCommand.cs @@ -405,7 +405,7 @@ internal override void ParameterAvailable(SmiParameterMetaData metaData, SmiType private SmiContext _smiRequestContext; // context that _smiRequest came from private CommandEventSink _smiEventSink; - private SmiEventSink_DeferedProcessing _outParamEventSink; + private SmiEventSink_DeferredProcessing _outParamEventSink; private CommandEventSink EventSink { @@ -421,13 +421,13 @@ private CommandEventSink EventSink } } - private SmiEventSink_DeferedProcessing OutParamEventSink + private SmiEventSink_DeferredProcessing OutParamEventSink { get { if (_outParamEventSink == null) { - _outParamEventSink = new SmiEventSink_DeferedProcessing(EventSink); + _outParamEventSink = new SmiEventSink_DeferredProcessing(EventSink); } else { diff --git a/src/Microsoft.Data.SqlClient/tests/CustomConfigurableRetryLogic/CustomRetryLogicProvider.csproj b/src/Microsoft.Data.SqlClient/tests/CustomConfigurableRetryLogic/CustomRetryLogicProvider.csproj index 8a076d1e52..de56643644 100644 --- a/src/Microsoft.Data.SqlClient/tests/CustomConfigurableRetryLogic/CustomRetryLogicProvider.csproj +++ b/src/Microsoft.Data.SqlClient/tests/CustomConfigurableRetryLogic/CustomRetryLogicProvider.csproj @@ -1,8 +1,6 @@  ExternalConfigurableRetryLogic - netfx - netcoreapp false $(ObjFolder)$(Configuration).$(Platform).$(AssemblyName) $(BinFolder)$(Configuration).$(Platform).$(AssemblyName) @@ -10,9 +8,22 @@ - - - - - + + + + + + + + + + + + + + + + + + diff --git a/src/Microsoft.Data.SqlClient/tests/Directory.Build.props b/src/Microsoft.Data.SqlClient/tests/Directory.Build.props index e0916258e1..5d206a754f 100644 --- a/src/Microsoft.Data.SqlClient/tests/Directory.Build.props +++ b/src/Microsoft.Data.SqlClient/tests/Directory.Build.props @@ -2,16 +2,12 @@ - - + + - $(OS) - true - true Debug;Release; AnyCPU;x86;x64 - Project @@ -19,26 +15,34 @@ false - - net462 - net9.0 + net462 + net8.0;net9.0 - - + + - $(TargetNetCoreVersion);$(TargetNetFxVersion) - $(TargetNetCoreVersion); + $(TF) - + + + + $(NetTargets) + $(NetFxTargets) + + + - $(TargetNetCoreVersion) - $(TargetNetFxVersion) + $(NetFxTargets);$(NetTargets) + diff --git a/src/Microsoft.Data.SqlClient/tests/Docker/Directory.Build.props b/src/Microsoft.Data.SqlClient/tests/Docker/Directory.Build.props deleted file mode 100644 index c2ea57281c..0000000000 --- a/src/Microsoft.Data.SqlClient/tests/Docker/Directory.Build.props +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - diff --git a/src/Microsoft.Data.SqlClient/tests/Docker/DockerLinuxTest/Microsoft.Data.SqlClient.DockerLinuxTest.csproj b/src/Microsoft.Data.SqlClient/tests/Docker/DockerLinuxTest/Microsoft.Data.SqlClient.DockerLinuxTest.csproj index bd320959f7..dcf1a571d5 100644 --- a/src/Microsoft.Data.SqlClient/tests/Docker/DockerLinuxTest/Microsoft.Data.SqlClient.DockerLinuxTest.csproj +++ b/src/Microsoft.Data.SqlClient/tests/Docker/DockerLinuxTest/Microsoft.Data.SqlClient.DockerLinuxTest.csproj @@ -1,7 +1,7 @@  Exe - net8.0 + net8.0 Linux ..\..\..\..\.. Unix diff --git a/src/Microsoft.Data.SqlClient/tests/FunctionalTests/Microsoft.Data.SqlClient.Tests.csproj b/src/Microsoft.Data.SqlClient/tests/FunctionalTests/Microsoft.Data.SqlClient.Tests.csproj index 646535116d..e103f2528b 100644 --- a/src/Microsoft.Data.SqlClient/tests/FunctionalTests/Microsoft.Data.SqlClient.Tests.csproj +++ b/src/Microsoft.Data.SqlClient/tests/FunctionalTests/Microsoft.Data.SqlClient.Tests.csproj @@ -2,10 +2,12 @@ false FunctionalTests - netfx - netcoreapp - win - win-$(Platform) + + true + + win + win-$(Platform) + $(ObjFolder)$(Configuration).$(Platform).$(AssemblyName) $(BinFolder)$(Configuration).$(Platform).$(AssemblyName) true @@ -74,74 +76,103 @@ - + + - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - + runtime; build; native; contentfiles; analyzers; buildtransitive all - + runtime; build; native; contentfiles; analyzers; buildtransitive all + + + + PreserveNewest + xunit.runner.json + + + + + - - - - - - + + + + - - + + + + + + + + + + + + Address - - TDS.Servers + + TDS TDS.EndPoint - - TDS + + TDS.Servers - - - - - - - - - PreserveNewest - %(Filename)%(Extension) - - - - + + - - PreserveNewest - xunit.runner.json - + + + + + + + + + + + + + + PreserveNewest + %(Filename)%(Extension) + + + + + + + + + + + + + + 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.ManualTesting.Tests.csproj index 5dfad69698..42358394c9 100644 --- a/src/Microsoft.Data.SqlClient/tests/ManualTests/Microsoft.Data.SqlClient.ManualTesting.Tests.csproj +++ b/src/Microsoft.Data.SqlClient/tests/ManualTests/Microsoft.Data.SqlClient.ManualTesting.Tests.csproj @@ -2,12 +2,14 @@ {45DB5F86-7AE3-45C6-870D-F9357B66BDB5} ManualTests - netfx - netcoreapp + + true + + win + win-$(Platform) + false Microsoft.Data.SqlClient.ManualTesting.Tests.ruleset - win - win-$(Platform) $(ObjFolder)$(Configuration).$(Platform).$(AssemblyName) $(BinFolder)$(Configuration).$(Platform).$(AssemblyName) true @@ -71,7 +73,7 @@ - + @@ -252,17 +254,17 @@ - + - + - + - + @@ -317,22 +319,44 @@ - - - - + + + + + + + + + + + + + + + PreserveNewest + %(Filename)%(Extension) + + + + + + + + + + + + + + + - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - + runtime; build; native; contentfiles; analyzers; buildtransitive all @@ -343,21 +367,22 @@ - + + - - - + + + - + PreserveNewest %(Filename)%(Extension) diff --git a/src/Microsoft.Data.SqlClient/tests/ManualTests/Microsoft.Data.SqlClient.ManualTesting.Tests.ruleset b/src/Microsoft.Data.SqlClient/tests/ManualTests/Microsoft.Data.SqlClient.ManualTesting.Tests.ruleset index 153e4717db..9fa7326f9b 100644 --- a/src/Microsoft.Data.SqlClient/tests/ManualTests/Microsoft.Data.SqlClient.ManualTesting.Tests.ruleset +++ b/src/Microsoft.Data.SqlClient/tests/ManualTests/Microsoft.Data.SqlClient.ManualTesting.Tests.ruleset @@ -1,4 +1,9 @@  + @@ -71,4 +76,4 @@ - \ No newline at end of file + diff --git a/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/UdtTest/UDTs/Address/Address.csproj b/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/UdtTest/UDTs/Address/Address.csproj index 941b08588c..777d7d8f2f 100644 --- a/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/UdtTest/UDTs/Address/Address.csproj +++ b/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/UdtTest/UDTs/Address/Address.csproj @@ -3,15 +3,32 @@ Address Address {D1392B54-998A-4F27-BC17-4CE149117BCC} - netfx - netcoreapp $(ObjFolder)$(Configuration).$(Platform)\$(AssemblyName) $(BinFolder)$(Configuration).$(Platform)\$(AssemblyName) - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/UdtTest/UDTs/Circle/Circle.csproj b/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/UdtTest/UDTs/Circle/Circle.csproj index 93137d1883..1e01c46dd1 100644 --- a/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/UdtTest/UDTs/Circle/Circle.csproj +++ b/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/UdtTest/UDTs/Circle/Circle.csproj @@ -3,15 +3,32 @@ Circle Circle {6C88F00F-9597-43AD-9E5F-9B344DA3B16F} - netfx - netcoreapp $(ObjFolder)$(Configuration).$(Platform)\$(AssemblyName) $(BinFolder)$(Configuration).$(Platform)\$(AssemblyName) - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/UdtTest/UDTs/Shapes/Shapes.csproj b/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/UdtTest/UDTs/Shapes/Shapes.csproj index 596f7ffe74..ab51615c4e 100644 --- a/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/UdtTest/UDTs/Shapes/Shapes.csproj +++ b/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/UdtTest/UDTs/Shapes/Shapes.csproj @@ -3,15 +3,32 @@ Shapes Shapes {B73A7063-37C3-415D-AD53-BB3DA20ABD6E} - netfx - netcoreapp $(ObjFolder)$(Configuration).$(Platform)\$(AssemblyName) $(BinFolder)$(Configuration).$(Platform)\$(AssemblyName) - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/UdtTest/UDTs/Utf8String/Utf8String.csproj b/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/UdtTest/UDTs/Utf8String/Utf8String.csproj index ec1229e0e7..8a9757bba4 100644 --- a/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/UdtTest/UDTs/Utf8String/Utf8String.csproj +++ b/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/UdtTest/UDTs/Utf8String/Utf8String.csproj @@ -3,15 +3,32 @@ Utf8String Utf8String {E0A6BB21-574B-43D9-890D-6E1144F2EE9E} - netfx - netcoreapp $(ObjFolder)$(Configuration).$(Platform)\$(AssemblyName) $(BinFolder)$(Configuration).$(Platform)\$(AssemblyName) - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Microsoft.Data.SqlClient/tests/tools/Directory.Build.props b/src/Microsoft.Data.SqlClient/tests/tools/Directory.Build.props deleted file mode 100644 index abbaa56026..0000000000 --- a/src/Microsoft.Data.SqlClient/tests/tools/Directory.Build.props +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - diff --git a/src/Microsoft.Data.SqlClient/tests/tools/Microsoft.Data.SqlClient.ExtUtilities/Microsoft.Data.SqlClient.ExtUtilities.csproj b/src/Microsoft.Data.SqlClient/tests/tools/Microsoft.Data.SqlClient.ExtUtilities/Microsoft.Data.SqlClient.ExtUtilities.csproj index 710ddef2ef..514af3a5e6 100644 --- a/src/Microsoft.Data.SqlClient/tests/tools/Microsoft.Data.SqlClient.ExtUtilities/Microsoft.Data.SqlClient.ExtUtilities.csproj +++ b/src/Microsoft.Data.SqlClient/tests/tools/Microsoft.Data.SqlClient.ExtUtilities/Microsoft.Data.SqlClient.ExtUtilities.csproj @@ -1,6 +1,7 @@  Exe + net9.0 Microsoft.Data.SqlClient.ExtUtilities.Runner diff --git a/src/Microsoft.Data.SqlClient/tests/tools/Microsoft.Data.SqlClient.TestUtilities/Microsoft.Data.SqlClient.TestUtilities.csproj b/src/Microsoft.Data.SqlClient/tests/tools/Microsoft.Data.SqlClient.TestUtilities/Microsoft.Data.SqlClient.TestUtilities.csproj index f30ea24019..c27c91d9dc 100644 --- a/src/Microsoft.Data.SqlClient/tests/tools/Microsoft.Data.SqlClient.TestUtilities/Microsoft.Data.SqlClient.TestUtilities.csproj +++ b/src/Microsoft.Data.SqlClient/tests/tools/Microsoft.Data.SqlClient.TestUtilities/Microsoft.Data.SqlClient.TestUtilities.csproj @@ -1,9 +1,10 @@  - netfx - netcoreapp - win - win-$(Platform) + + true + + win + win-$(Platform) $(ObjFolder)$(Configuration).$(Platform)\$(AssemblyName) $(BinFolder)$(Configuration).$(Platform)\$(AssemblyName) diff --git a/tools/GenAPI/Directory.Build.Props b/tools/GenAPI/Directory.Build.props similarity index 62% rename from tools/GenAPI/Directory.Build.Props rename to tools/GenAPI/Directory.Build.props index 8eb4acce29..946ed70580 100644 --- a/tools/GenAPI/Directory.Build.Props +++ b/tools/GenAPI/Directory.Build.props @@ -2,8 +2,11 @@ - - + + diff --git a/tools/props/Versions.props b/tools/props/Versions.props index d4e2619f3b..d8fce76bc7 100644 --- a/tools/props/Versions.props +++ b/tools/props/Versions.props @@ -71,7 +71,7 @@ 8.0.1 6.0.0 2.9.2 - 2.8.2 + 2.8.2 $(NugetPackageVersion) diff --git a/tools/targets/NotSupported.targets b/tools/targets/NotSupported.targets index 890c4ae048..b451a0f6f7 100644 --- a/tools/targets/NotSupported.targets +++ b/tools/targets/NotSupported.targets @@ -42,7 +42,7 @@ $(GenAPIArgs) -o:"$(NotSupportedSourceFile)" $(GenAPIArgs) -t:"$(GeneratePlatformNotSupportedAssemblyMessage)" $(GenAPIArgs) -global - "$(DotNetCmd) $(ToolsArtifactsDir)$(TargetFramework)\Microsoft.DotNet.GenAPI.dll" + $(DotNetPath)dotnet "$(ToolsArtifactsDir)net8.0/Microsoft.DotNet.GenAPI.dll" "$(ToolsArtifactsDir)net472\Microsoft.DotNet.GenAPI.exe"