Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 42 additions & 10 deletions BUILDGUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,19 +192,51 @@ dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlCl

## Testing with Custom ReferenceType

Tests can be built and run with custom "Reference Type" property that enables different styles of testing:
The MDS driver consists of several components, each of which produces its own
NuGet package. During development, components reference each other via
`<ProjectReference>` properties by default. This means that building
and testing one component will implicitly build its project referenced
dependencies.

Alternatively, the `ReferenceType` build property property may be specified with
a value of `Package`. This will change inter-component dependencies to use
`<PackageReference>` dependencies, and require that dependent components be
built and packaged before building the depending component. In this scenario,
the root `NuGet.config` file must be updated to include the following entry
under the `<packageSources>` element:

```xml
<configuration>
<packageSources>
...
<add key="local" value="packages/" />
</packageSources>
</configuration>
```

As a convenience, a `NuGet.config.local` file is supplied with the above
package source already present. You may simply copy it over `NuGet.config`
when using `Package` references.

Then, you can specify `Package` references be used, for example:

- "Project" => Build and run tests with Microsoft.Data.SqlClient as a Project Reference
- "Package" => Build and run tests with Microsoft.Data.SqlClient as a Package Reference with configured "TestMicrosoftDataSqlClientVersion" in "Versions.props" file.
```bash
dotnet build -t:BuildAbstractions
dotnet build -t:BuildAzure -p:ReferenceType=Package
dotnet build -t:BuildAll -p:ReferenceType=Package
dotnet build -t:BuildAKVNetCore -p:ReferenceType=Package
dotnet build -t:GenerateMdsPackage
dotnet build -t:GenerateAkvPackage
dotnet build -t:BuildTestsNetCore -p:ReferenceType=Package
```

> ************** IMPORTANT NOTE BEFORE PROCEEDING WITH "PACKAGE" REFERENCE TYPE ***************
> 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
> ```
The above will build the Abstractions, Azure, MDS, and AKV components, place
their NuGet packages into the `packages/` directory, and then build the tests
using those packages.

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.
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

Expand Down
19 changes: 19 additions & 0 deletions NuGet.config.local
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
This NuGet config is used by our Azure Pipelines builds when we need to
reference packages that are not available on the public nuget.org feed.
-->
<configuration>
<packageSources>
<clear />
<!-- The normal feed. -->
<add key="governed" value="https://sqlclientdrivers.pkgs.visualstudio.com/public/_packaging/sqlclient/nuget/v3/index.json" />

<!-- Our local packages/ directory. -->
<add key="local" value="packages/" />
</packageSources>
<auditSources>
<clear />
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
</auditSources>
</configuration>
105 changes: 85 additions & 20 deletions build.proj
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,13 @@
<TargetNetCoreVersion Condition="$(TargetGroup) == 'netcoreapp' AND $(TargetNetCoreVersion) == ''">$(TF)</TargetNetCoreVersion>
<TargetNetFxVersion Condition="$(TargetGroup) == 'netfx' AND $(TargetNetFxVersion) == ''">$(TF)</TargetNetFxVersion>
<GenerateNuget Condition="'$(GenerateNuget)' == '' AND '$(IsEnabledWindows)' == 'true'">true</GenerateNuget>
<SqlServerLibProperties>Configuration=$(Configuration);AssemblyVersion=$(SqlServerAssemblyVersion);AssemblyFileVersion=$(SqlServerAssemblyFileVersion);Version=$(SqlServerPackageVersion);</SqlServerLibProperties>
<ProjectProperties>Configuration=$(Configuration);AssemblyFileVersion=$(AssemblyFileVersion);TargetsWindows=$(TargetsWindows);TargetsUnix=$(TargetsUnix);</ProjectProperties>

<CommonProperties>Configuration=$(Configuration);ReferenceType=$(ReferenceType)</CommonProperties>
<SqlServerLibProperties>$(CommonProperties);AssemblyVersion=$(SqlServerAssemblyVersion);AssemblyFileVersion=$(SqlServerAssemblyFileVersion);Version=$(SqlServerPackageVersion);</SqlServerLibProperties>
<ProjectProperties>$(CommonProperties);AssemblyFileVersion=$(AssemblyFileVersion);TargetsWindows=$(TargetsWindows);TargetsUnix=$(TargetsUnix);</ProjectProperties>
<TestProjectProperties>$(ProjectProperties);BuildForRelease=false;TargetNetCoreVersion=$(TargetNetCoreVersion);TargetNetFxVersion=$(TargetNetFxVersion)</TestProjectProperties>
<ResultsDirectory Condition="$(ResultsDirectory) == ''">TestResults</ResultsDirectory>

<!--
Path to a `dotnet` version like a x86 or any especific versions in addition to a default installed version.
This property is empty by default to use the default path of the system's path variable.
Expand All @@ -52,8 +55,11 @@

<!-- Populate all managed projects -->
<ItemGroup>
<Tools Include="tools/GenAPI/Microsoft.DotNet.GenAPI/Microsoft.DotNet.GenAPI.csproj" />
<Abstractions Include="src/Microsoft.Data.SqlClient.Extensions/Abstractions/src/Abstractions.csproj" />
<AbstractionsTest Include="src/Microsoft.Data.SqlClient.Extensions/Abstractions/test/Abstractions.Test.csproj" />
<Azure Include="src/Microsoft.Data.SqlClient.Extensions/Azure/src/Azure.csproj" />
<AzureTest Include="src/Microsoft.Data.SqlClient.Extensions/Azure/test/Azure.Test.csproj" />
<SqlServerLib Include="**/Microsoft.SqlServer.Server.csproj" />
<NetFxDriver Include="**/netfx/**/Microsoft.Data.SqlClient*.csproj" Condition="'$(IsEnabledWindows)' == 'true'" />
<NetCoreDriver Include="**/netcore/**/Microsoft.Data.SqlClient*.csproj" />
Expand Down Expand Up @@ -101,6 +107,8 @@

<!-- Abstractions Targets -->
<PropertyGroup>
<AbstractionsProperties>$(CommonProperties)</AbstractionsProperties>

<!--
If the AbstractionsPackageVersion property was supplied on the
command-line, then pass it along to the Abstractions build. Otherwise,
Expand All @@ -116,7 +124,7 @@
-->
<AbstractionsProperties
Condition="'$(AbstractionsPackageVersion)' != ''">
AbstractionsPackageVersion=$(AbstractionsPackageVersion)
$(AbstractionsProperties);AbstractionsPackageVersion=$(AbstractionsPackageVersion)
</AbstractionsProperties>

<!-- Do the same for the AbstractionsAssemblyFileVersion property. -->
Expand All @@ -133,7 +141,7 @@
Properties="$(AbstractionsProperties)" />
</Target>

<Target Name="BuildAbstractions">
<Target Name="BuildAbstractions" DependsOnTargets="RestoreAbstractions">
<MSBuild
Projects="@(Abstractions)"
Targets="Build;Pack"
Expand All @@ -147,22 +155,78 @@
Properties="$(AbstractionsProperties)" />
</Target>

<Target Name="BuildAbstractionsTest">
<Target Name="BuildAbstractionsTest" DependsOnTargets="RestoreAbstractionsTest">
<MSBuild
Projects="@(AbstractionsTest)"
Targets="Build"
Properties="$(AbstractionsProperties)" />
</Target>

<!-- Azure Targets -->
<PropertyGroup>
<AzureProperties>$(CommonProperties)</AzureProperties>

<!--
If the AzurePackageVersion property was supplied on the command-line, then
pass it along to the Azure build. Otherwise, omit it entirely to avoid it
expanding as empty here and thus overriding the default behaviour in the
Azure project. Command-line properties take precedence over project
defaults, even if their value is empty. For example:

dotnet build -p:AzurePackageVersion=

That results in $(AzurePackageVersion) being defined as empty, and cannot
be overridden by the project.
-->
<AzureProperties
Condition="'$(AzurePackageVersion)' != ''">
$(AzureProperties);AzurePackageVersion=$(AzurePackageVersion)
</AzureProperties>

<!-- Do the same for the AzureAssemblyFileVersion property. -->
<AzureProperties
Condition="'$(AzureAssemblyFileVersion)' != ''">
$(AzureProperties);AzureAssemblyFileVersion=$(AzureAssemblyFileVersion)
</AzureProperties>
</PropertyGroup>

<Target Name="RestoreAzure">
<MSBuild
Projects="@(Azure)"
Targets="Restore"
Properties="$(AzureProperties)" />
</Target>

<Target Name="BuildAzure" DependsOnTargets="RestoreAzure">
<MSBuild
Projects="@(Azure)"
Targets="Build;Pack"
Properties="$(AzureProperties)" />
</Target>

<Target Name="RestoreAzureTest">
<MSBuild
Projects="@(AzureTest)"
Targets="Restore"
Properties="$(AzureProperties)" />
</Target>

<Target Name="BuildAzureTest" DependsOnTargets="RestoreAzureTest">
<MSBuild
Projects="@(AzureTest)"
Targets="Build"
Properties="$(AzureProperties)" />
</Target>

<!-- Other Targets -->
<Target Name="RestoreSqlServerLib">
<MSBuild Projects="@(SqlServerLib)" Targets="restore" />
<MSBuild Projects="@(SqlServerLib)" Targets="restore" Properties="$(SqlServerLibProperties)" />
</Target>

<Target
Name="RestoreNetCore"
DependsOnTargets="RestoreSqlServerLib;RestoreAbstractions">
<MSBuild Projects="@(NetCoreDriver)" Targets="restore" />
<MSBuild Projects="@(NetCoreDriver)" Targets="restore" Properties="$(ProjectProperties)" />
</Target>

<Target Name="RestoreTestsNetCore" DependsOnTargets="RestoreNetCore">
Expand All @@ -175,7 +239,7 @@
Name="RestoreNetFx"
DependsOnTargets="RestoreSqlServerLib;RestoreAbstractions"
Condition="'$(IsEnabledWindows)' == 'true'">
<MSBuild Projects="@(NetFxDriver)" Targets="restore" />
<MSBuild Projects="@(NetFxDriver)" Targets="restore" Properties="$(ProjectProperties)" />
</Target>

<Target
Expand All @@ -187,11 +251,12 @@
<MSBuild Projects="@(UnitTests)" Targets="restore" Properties="$(TestProjectProperties)"/>
</Target>

<Target Name="BuildTools" Condition="'$(BuildTools)' == 'true'">
<PropertyGroup>
<DotnetBuildCmd>dotnet build -c Release -p:ReferenceType=$(ReferenceType)</DotnetBuildCmd>
</PropertyGroup>
<Exec Command="$(DotnetBuildCmd)" WorkingDirectory="$(GenAPISrcDir)Microsoft.DotNet.GenAPI\" />
<Target Name="RestoreTools" Condition="'$(BuildTools)' == 'true'">
<MSBuild Projects="@(Tools)" Targets="restore" Properties="$(CommonProperties)" />
</Target>

<Target Name="BuildTools" DependsOnTargets="RestoreTools" Condition="'$(BuildTools)' == 'true'">
<MSBuild Projects="@(Tools)" Properties="$(CommonProperties)" />
</Target>

<Target
Expand All @@ -206,11 +271,11 @@
</Target>

<Target Name="BuildSqlServerLib" DependsOnTargets="RestoreSqlServerLib">
<Message Text=">>> Building SqlServerLib [$(CI);$(SqlServerLibProperties);Platform=AnyCPU;ReferenceType=$(ReferenceType);] ..." Condition="!$(ReferenceType.Contains('Package'))" />
<Message Text=">>> Building SqlServerLib [$(CI);$(SqlServerLibProperties);Platform=AnyCPU] ..." Condition="!$(ReferenceType.Contains('Package'))" />
<MSBuild Projects="@(SqlServerLib)" Properties="$(CI);$(SqlServerLibProperties);Platform=AnyCPU;" RemoveProperties="TargetsWindows;TargetsUnix;" Condition="!$(ReferenceType.Contains('Package'))" />

<!-- Only build platform specific builds for Package reference types -->
<Message Text=">>> Building SqlServerLib [$(CI);$(SqlServerLibProperties);Platform=$(Platform);ReferenceType=$(ReferenceType);] ..." Condition="$(ReferenceType.Contains('Package'))" />
<Message Text=">>> Building SqlServerLib [$(CI);$(SqlServerLibProperties);Platform=$(Platform)] ..." Condition="$(ReferenceType.Contains('Package'))" />
<MSBuild Projects="@(SqlServerLib)" Properties="$(CI);$(SqlServerLibProperties);Platform=$(Platform);" Condition="$(ReferenceType.Contains('Package'))" />
</Target>

Expand Down Expand Up @@ -238,29 +303,29 @@
Name="BuildUnitTestsNetCore"
DependsOnTargets="RestoreTestsNetCore;BuildNetCore"
Condition="$(ReferenceType.Contains('Project'))">
<Message Text=">>> Building UnitTestsNetCore [TestTargetOS=$(TestOS)netcoreapp;$(TestProjectProperties);Platform=AnyCPU;ReferenceType=$(ReferenceType);] ..." Condition="!$(ReferenceType.Contains('Package'))"/>
<Message Text=">>> Building UnitTestsNetCore [TestTargetOS=$(TestOS)netcoreapp;$(TestProjectProperties);Platform=AnyCPU] ..." Condition="!$(ReferenceType.Contains('Package'))"/>
<MSBuild Projects="@(UnitTests)" Properties="TestTargetOS=$(TestOS)netcoreapp;$(TestProjectProperties);Platform=AnyCPU;" Condition="!$(ReferenceType.Contains('Package'))" />
</Target>

<Target
Name="BuildFunctionalTestsNetCore"
DependsOnTargets="RestoreTestsNetCore;BuildNetCore;BuildAKVNetCore">
<Message Text=">>> Building FunctionalTestsNetCore [TestTargetOS=$(TestOS)netcoreapp;$(TestProjectProperties);Platform=AnyCPU;ReferenceType=$(ReferenceType);] ..." Condition="!$(ReferenceType.Contains('Package'))" />
<Message Text=">>> Building FunctionalTestsNetCore [TestTargetOS=$(TestOS)netcoreapp;$(TestProjectProperties);Platform=AnyCPU] ..." Condition="!$(ReferenceType.Contains('Package'))" />
<MSBuild Projects="@(FunctionalTests)" Properties="TestTargetOS=$(TestOS)netcoreapp;$(TestProjectProperties);Platform=AnyCPU;" Condition="!$(ReferenceType.Contains('Package'))" />

<!-- Only build platform specific builds for Package reference types -->
<Message Text=">>> Building FunctionalTestsNetCore [TestTargetOS=$(TestOS)netcoreapp;$(TestProjectProperties);Platform=$(Platform);ReferenceType=$(ReferenceType);] ..." Condition="$(ReferenceType.Contains('Package'))" />
<Message Text=">>> Building FunctionalTestsNetCore [TestTargetOS=$(TestOS)netcoreapp;$(TestProjectProperties);Platform=$(Platform)] ..." Condition="$(ReferenceType.Contains('Package'))" />
<MSBuild Projects="@(FunctionalTests)" Properties="TestTargetOS=$(TestOS)netcoreapp;$(TestProjectProperties);Platform=$(Platform);" Condition="$(ReferenceType.Contains('Package'))" />
</Target>

<Target
Name="BuildManualTestsNetCore"
DependsOnTargets="RestoreTestsNetCore;BuildNetCore;BuildAKVNetCore">
<Message Text=">>> Building ManualTestsNetCore [TestTargetOS=$(TestOS)netcoreapp;$(TestProjectProperties);Platform=AnyCPU;ReferenceType=$(ReferenceType);] ..." Condition="!$(ReferenceType.Contains('Package'))" />
<Message Text=">>> Building ManualTestsNetCore [TestTargetOS=$(TestOS)netcoreapp;$(TestProjectProperties);Platform=AnyCPU] ..." Condition="!$(ReferenceType.Contains('Package'))" />
<MSBuild Projects="@(ManualTests)" Properties="TestTargetOS=$(TestOS)netcoreapp;$(TestProjectProperties);Platform=AnyCPU;" Condition="!$(ReferenceType.Contains('Package'))" />

<!-- Only build platform specific builds for Package reference types -->
<Message Text=">>> Building ManualTestsNetCore [TestTargetOS=$(TestOS)netcoreapp;$(TestProjectProperties);Platform=$(Platform);ReferenceType=$(ReferenceType);] ..." Condition="$(ReferenceType.Contains('Package'))" />
<Message Text=">>> Building ManualTestsNetCore [TestTargetOS=$(TestOS)netcoreapp;$(TestProjectProperties);Platform=$(Platform)] ..." Condition="$(ReferenceType.Contains('Package'))" />
<MSBuild Projects="@(ManualTests)" Properties="TestTargetOS=$(TestOS)netcoreapp;$(TestProjectProperties);Platform=$(Platform);" Condition="$(ReferenceType.Contains('Package'))" />
</Target>

Expand Down Expand Up @@ -418,7 +483,7 @@
<TestCommand>$(TestCommand.Replace($([System.Environment]::NewLine), " "))</TestCommand>
</PropertyGroup>
<Message Text=">>> Running Manual test for Windows via command: $(TestCommand)" />
<Exec ConsoleToMsBuild="true" Command="$(TestCommand)" />

Check failure on line 486 in build.proj

View check run for this annotation

Azure Pipelines / CI-SqlClient (Win22_Azure_Sql net9_0_AnyCPU_ManagedSNI_3)

build.proj#L486

build.proj(486,5): Error MSB3073: The command " dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" --no-build -v n -p:Configuration=Release -p:TargetnetcoreVersion=net9.0 -p:ReferenceType=Project -p:TestSet=3 -p:TestTargetOS=Windowsnetcoreapp --collect "Code coverage" --results-directory TestResults --filter "category!=nonnetcoreapptests&category!=failing&category!=nonwindowstests" --logger:"trx;LogFilePrefix=Manual-Windowsnetcoreapp-3" " exited with code 1.

Check failure on line 486 in build.proj

View check run for this annotation

Azure Pipelines / CI-SqlClient (Win22_Azure_ARM64_Sql net8_0_AnyCPU_NativeSNI_3)

build.proj#L486

build.proj(486,5): Error MSB3073: The command " dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" --no-build -v n -p:Configuration=Release -p:TargetnetcoreVersion=net8.0 -p:ReferenceType=Project -p:TestSet=3 -p:TestTargetOS=Windowsnetcoreapp --collect "Code coverage" --results-directory TestResults --filter "category!=nonnetcoreapptests&category!=failing&category!=nonwindowstests" --logger:"trx;LogFilePrefix=Manual-Windowsnetcoreapp-3" " exited with code 1.

Check failure on line 486 in build.proj

View check run for this annotation

Azure Pipelines / CI-SqlClient (win11_Azure_Sql net9_0_AnyCPU_ManagedSNI_3)

build.proj#L486

build.proj(486,5): Error MSB3073: The command " dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" --no-build -v n -p:Configuration=Release -p:TargetnetcoreVersion=net9.0 -p:ReferenceType=Project -p:TestSet=3 -p:TestTargetOS=Windowsnetcoreapp --collect "Code coverage" --results-directory TestResults --filter "category!=nonnetcoreapptests&category!=failing&category!=nonwindowstests" --logger:"trx;LogFilePrefix=Manual-Windowsnetcoreapp-3" " exited with code 1.

Check failure on line 486 in build.proj

View check run for this annotation

Azure Pipelines / CI-SqlClient (Win22_Azure_ARM64_Sql net9_0_AnyCPU_ManagedSNI_3)

build.proj#L486

build.proj(486,5): Error MSB3073: The command " dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" --no-build -v n -p:Configuration=Release -p:TargetnetcoreVersion=net9.0 -p:ReferenceType=Project -p:TestSet=3 -p:TestTargetOS=Windowsnetcoreapp --collect "Code coverage" --results-directory TestResults --filter "category!=nonnetcoreapptests&category!=failing&category!=nonwindowstests" --logger:"trx;LogFilePrefix=Manual-Windowsnetcoreapp-3" " exited with code 1.

Check failure on line 486 in build.proj

View check run for this annotation

Azure Pipelines / CI-SqlClient

build.proj#L486

build.proj(486,5): Error MSB3073: The command " dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" --no-build -v n -p:Configuration=Release -p:TargetnetcoreVersion=net9.0 -p:ReferenceType=Project -p:TestSet=3 -p:TestTargetOS=Windowsnetcoreapp --collect "Code coverage" --results-directory TestResults --filter "category!=nonnetcoreapptests&category!=failing&category!=nonwindowstests" --logger:"trx;LogFilePrefix=Manual-Windowsnetcoreapp-3" " exited with code 1.
</Target>

<!-- Run all Manual tests applicable to Unix. -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
configuration: $(Configuration)
msbuildArguments: -t:BuildTools

# Perform analysis before building, since this step will clobber build output
# Perform analysis before building, since this step will clobber build output.
- template: ../steps/code-analyze-step.yml@self

# Update the root NuGet.config to use the packages/ directory as a source.
Expand Down
13 changes: 13 additions & 0 deletions eng/pipelines/common/templates/jobs/ci-run-tests-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ parameters:
- name: abstractionsPackageVersion
type: string

- name: azureArtifactName
type: string

- name: azurePackageVersion
type: string

- name: configProperties
type: object
default: {} # - key: 'value'
Expand Down Expand Up @@ -121,6 +127,12 @@ jobs:
artifactName: ${{ parameters.mdsArtifactName }}
targetPath: $(Build.SourcesDirectory)/packages

- task: DownloadPipelineArtifact@2
displayName: Download Azure Package Artifact
inputs:
artifactName: ${{ parameters.azureArtifactName }}
targetPath: $(Build.SourcesDirectory)/packages

- ${{ if ne(parameters.prebuildSteps, '') }}:
- ${{ parameters.prebuildSteps }} # extra steps to run before the build like downloading sni and the required configuration

Expand Down Expand Up @@ -253,6 +265,7 @@ jobs:
referenceType: ${{ parameters.referenceType }}
testSet: ${{ parameters.testSet }}
abstractionsPackageVersion: ${{ parameters.abstractionsPackageVersion }}
azurePackageVersion: ${{ parameters.azurePackageVersion }}
mdsPackageVersion: ${{ parameters.mdsPackageVersion }}
${{ if ne(parameters.operatingSystem, 'Windows') }}:
OSGroup: Unix
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -305,17 +305,6 @@ jobs:
Get-ChildItem *.dll -Path $(extractedNugetPath) -Recurse | ForEach-Object VersionInfo | Format-List
displayName: 'Verify "File Version" matches expected values for DLLs'

- powershell: |
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed the TestMicrosoftDataSqlClientVersion build property entirely. It was made redundant by MdsPackageVersion.

# Change TestMicrosoftDataSqlClientVersion

[Xml] $versionprops = Get-Content -Path "tools/props/Versions.props"
$versionpropspath = "tools\props\Versions.props"
$versionprops.Project.PropertyGroup[$versionprops.Project.PropertyGroup.Count-1].TestMicrosoftDataSqlClientVersion ="$(mdsPackageVersion)"
Write-Host "Saving Test nuget version at $rootfolder\props ...." -ForegroundColor Green
$versionprops.Save($versionpropspath)

displayName: 'Modify TestMicrosoftDataSqlClientVersion'

- powershell: |
# Check assembly versions.
#
Expand Down
14 changes: 12 additions & 2 deletions eng/pipelines/common/templates/stages/ci-run-tests-stage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ parameters:
- name: abstractionsPackageVersion
type: string

- name: azureArtifactName
type: string

- name: azurePackageVersion
type: string

- name: debug
type: boolean
default: false
Expand Down Expand Up @@ -68,7 +74,9 @@ stages:
jobDisplayName: ${{ format('{0}_{1}_{2}', replace(targetFramework, '.', '_'), platform, testSet) }}
configProperties: ${{ config.value.configProperties }}
abstractionsArtifactName: ${{ parameters.abstractionsArtifactName }}
abstractionsPackageVersion: ${{parameters.abstractionsPackageVersion}}
abstractionsPackageVersion: ${{ parameters.abstractionsPackageVersion }}
azureArtifactName: ${{ parameters.azureArtifactName }}
azurePackageVersion: ${{ parameters.azurePackageVersion }}
mdsArtifactName: ${{ parameters.mdsArtifactName }}
mdsPackageVersion: ${{ parameters.mdsPackageVersion }}
prebuildSteps: ${{ parameters.prebuildSteps }}
Expand Down Expand Up @@ -102,7 +110,9 @@ stages:
configProperties: ${{ config.value.configProperties }}
useManagedSNI: ${{ useManagedSNI }}
abstractionsArtifactName: ${{ parameters.abstractionsArtifactName }}
abstractionsPackageVersion: ${{parameters.abstractionsPackageVersion}}
abstractionsPackageVersion: ${{ parameters.abstractionsPackageVersion }}
azureArtifactName: ${{ parameters.azureArtifactName }}
azurePackageVersion: ${{ parameters.azurePackageVersion }}
mdsArtifactName: ${{ parameters.mdsArtifactName }}
mdsPackageVersion: ${{ parameters.mdsPackageVersion }}
prebuildSteps: ${{ parameters.prebuildSteps }}
Expand Down
Loading
Loading