|
1 | 1 | <Project> |
| 2 | + |
| 3 | + <!-- ===================================================================== --> |
| 4 | + <!-- |
| 5 | + Versions.props import strategy: |
| 6 | +
|
| 7 | + Each product has a Versions.props that computes its version properties (e.g. |
| 8 | + SqlClientPackageVersion). These files can be imported from two places: |
| 9 | +
|
| 10 | + 1. Here, in Directory.Packages.props (Package mode only) — imports ALL |
| 11 | + Versions.props early so that centrally-managed PackageVersion items can |
| 12 | + reference the computed version values for sibling package pinning. |
| 13 | +
|
| 14 | + 2. In each product's own csproj (conditional) — imports the product's own |
| 15 | + Versions.props so standalone / Project-mode builds still get versions. |
| 16 | +
|
| 17 | + To prevent double-evaluation when both paths fire, every Versions.props sets |
| 18 | + an import-guard property (e.g. SqlClientVersionsImported=true) on first load. |
| 19 | + The csproj-level import checks that guard and becomes a no-op if the file was |
| 20 | + already imported here. |
| 21 | + --> |
| 22 | + <ImportGroup Condition="'$(ReferenceType)' == 'Package'"> |
| 23 | + <Import Project="src/Microsoft.Data.SqlClient/Versions.props" /> |
| 24 | + <Import Project="src/Microsoft.SqlServer.Server/Versions.props" /> |
| 25 | + <Import Project="src/Microsoft.Data.SqlClient.Internal/Logging/src/Versions.props" /> |
| 26 | + <Import Project="src/Microsoft.Data.SqlClient.Extensions/Abstractions/src/Versions.props" /> |
| 27 | + <Import Project="src/Microsoft.Data.SqlClient.Extensions/Azure/src/Versions.props" /> |
| 28 | + <Import Project="src/Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider/src/Versions.props" /> |
| 29 | + </ImportGroup> |
| 30 | + |
2 | 31 | <PropertyGroup> |
3 | 32 | <ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally> |
4 | 33 | <!-- |
|
14 | 43 | <!-- ===================================================================== --> |
15 | 44 | <!-- Driver Packages --> |
16 | 45 |
|
17 | | - <!-- Ordered from least dependent to most dependent, and then alphabetically. --> |
18 | | - |
19 | | - <ItemGroup> |
20 | | - <!-- |
21 | | - We never reference this package via its project, so we always need a |
22 | | - version specified. |
23 | | - --> |
24 | | - <PackageVersion Include="Microsoft.SqlServer.Server" Version="1.0.0" /> |
25 | | - </ItemGroup> |
26 | | - |
27 | | - <!-- |
28 | | - We only need other driver package versions specified when building via |
29 | | - package references. |
30 | | - --> |
| 46 | + <!-- The driver packages need version numbers when we build via Package references. --> |
31 | 47 | <ItemGroup Condition="'$(ReferenceType)' == 'Package'"> |
| 48 | + <PackageVersion |
| 49 | + Include="Microsoft.SqlServer.Server" |
| 50 | + Version="$(SqlServerPackageVersion)" /> |
32 | 51 | <PackageVersion |
33 | 52 | Include="Microsoft.Data.SqlClient.Internal.Logging" |
34 | 53 | Version="$(LoggingPackageVersion)" /> |
35 | 54 | <PackageVersion |
36 | 55 | Include="Microsoft.Data.SqlClient.Extensions.Abstractions" |
37 | 56 | Version="$(AbstractionsPackageVersion)" /> |
38 | | - <PackageVersion |
39 | | - Include="Microsoft.Data.SqlClient.Extensions.Azure" |
40 | | - Version="$(AzurePackageVersion)" /> |
41 | 57 | <PackageVersion |
42 | 58 | Include="Microsoft.Data.SqlClient" |
43 | 59 | Version="$(SqlClientPackageVersion)" /> |
| 60 | + <PackageVersion |
| 61 | + Include="Microsoft.Data.SqlClient.Extensions.Azure" |
| 62 | + Version="$(AzurePackageVersion)" /> |
44 | 63 | <PackageVersion |
45 | 64 | Include="Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider" |
46 | 65 | Version="$(AkvProviderPackageVersion)" /> |
|
0 commit comments