Skip to content

Commit d1a97df

Browse files
Official pipeline tweaks - round 3 (#3452)
* - Added netstandard2.0 to the list of expected runtimes when validating an Official MDS package. - Added comments to Versions.props warning of fragile validation logic. - Improved comments in the validation pipeline job. * Addressed Copilot suggestion. Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 1fc570e commit d1a97df

File tree

3 files changed

+32
-9
lines changed

3 files changed

+32
-9
lines changed

eng/pipelines/common/templates/jobs/validate-signed-package-job.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -283,8 +283,11 @@ jobs:
283283
displayName: 'Verify all dlls status are Valid'
284284
285285
- powershell: |
286-
# This will check for ProductVersion and FileVersion
287-
# For NetFx we have a different FileVersion, but product versions are all the same some may have and extra numbering at the end. we only check for # first parts
286+
# This will check for ProductVersion and FileVersion.
287+
#
288+
# For NetFx we have a different FileVersion, but product versions are all
289+
# the same. Some may have extra numbering at the end. We only check for
290+
# the first parts.
288291
289292
foreach ( $pVersion in Get-ChildItem *.dll -Path $(extractedNugetPath) -Recurse | ForEach-Object versioninfo )
290293
{
@@ -329,7 +332,7 @@ jobs:
329332
displayName: 'Verify "File Version" matches provided pipeline variable "ASSEMBLY_FILE_VERSION" for DLLs'
330333
331334
- powershell: |
332-
#Change TestMicrosoftDataSqlClientVersion
335+
# Change TestMicrosoftDataSqlClientVersion
333336
334337
[Xml] $versionprops = Get-Content -Path "tools/props/Versions.props"
335338
$versionpropspath = "tools\props\Versions.props"
@@ -340,7 +343,7 @@ jobs:
340343
displayName: 'Modify TestMicrosoftDataSqlClientVersion'
341344
342345
- powershell: |
343-
#Change TestMicrosoftDataSqlClientVersion
346+
# Check assembly versions.
344347
345348
[Xml] $versionprops = Get-Content -Path "tools/props/Versions.props"
346349
$AssemblyFileVersion = $versionprops.Project.PropertyGroup[0].AssemblyFileVersion

eng/pipelines/libraries/mds-validation-variables.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ variables:
1717
- name: expectedFolderNames
1818
value: lib,ref,runtimes
1919
- name: expectedDotnetVersions
20-
value: net462,net8.0,net9.0
20+
value: netstandard2.0,net462,net8.0,net9.0
2121
- name: Database
2222
value: Northwind
2323
- name: platform

tools/props/Versions.props

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,23 @@
44
<PropertyGroup>
55
<MdsVersionDefault>6.1.0</MdsVersionDefault>
66
<BuildNumber Condition="'$(BuildNumber)' == ''">0</BuildNumber>
7+
8+
<!--
9+
GOTCHA: These two properties must appear in the first <PropertyGroup> in
10+
this file due to hardcoded XML processing in:
11+
12+
eng/pipelines/common/templates/jobs/validate-signed-package-job.yml
13+
-->
714
<AssemblyFileVersion Condition="'$(AssemblyFileVersion)' == ''">$(MdsVersionDefault).$(BuildNumber)</AssemblyFileVersion>
8-
<FileVersion>$(AssemblyFileVersion)</FileVersion>
9-
<!-- This Assembly version corresponds to version of Microsoft.Data.SqlClient Assembly. -->
10-
<!-- Should only be changed in future when a non-backwards compatible driver is released. -->
11-
<!-- Future Assembly Version values shall be Major.Minor.0.0; e.g. 4.0.0.0 -->
15+
<!--
16+
This sets the version of the Microsoft.Data.SqlClient assembly. It
17+
should only be updated when the major version of the MDS package changes
18+
and introduces breaking changes. Only ever update the major version
19+
number. All other version parts must be set to 0.
20+
-->
1221
<AssemblyVersion>6.0.0.0</AssemblyVersion>
22+
23+
<FileVersion>$(AssemblyFileVersion)</FileVersion>
1324
<NugetPackageVersion Condition="'$(NugetPackageVersion)' == ''">$(MdsVersionDefault)-dev</NugetPackageVersion>
1425
<Version>$(NugetPackageVersion)</Version>
1526
</PropertyGroup>
@@ -24,6 +35,15 @@
2435
</PropertyGroup>
2536
<PropertyGroup>
2637
<TestAKVProviderVersion>$(NugetPackageVersion)</TestAKVProviderVersion>
38+
39+
<!--
40+
GOTCHA: This property must appear in the last <PropertyGroup> in this file
41+
due to hardcoded XML processing in:
42+
43+
eng/pipelines/common/templates/jobs/validate-signed-package-job.yml
44+
45+
See the 'Modify TestMicrosoftDataSqlClientVersion' step.
46+
-->
2747
<TestMicrosoftDataSqlClientVersion>$(NugetPackageVersion)</TestMicrosoftDataSqlClientVersion>
2848
</PropertyGroup>
2949
</Project>

0 commit comments

Comments
 (0)