|
4 | 4 | <!--
|
5 | 5 | Additional project config is imported from parent Directory.Build.props
|
6 | 6 | files.
|
7 |
| - --> |
8 |
| - |
9 |
| - <!-- Versioning Properties --> |
10 |
| - <PropertyGroup> |
11 |
| - <!-- |
12 |
| - We accept two external properties to control versioning: |
13 |
| -
|
14 |
| - AbstractionsPackageVersion: |
15 |
| - - Used as the NuGet package version, both in the package file name |
16 |
| - and in the package metadata. |
17 |
| - - Used as the base value of the assembly attribute |
18 |
| - 'AssemblyInformationalVersion' generated by MSBuild. |
19 |
| - - If not specified, defaults to: |
20 |
| - $(DefaultMajorVersion).0.0.$(BuildNumber)-dev. |
21 |
| - |
22 |
| - AbstractionsAssemblyFileVersion: |
23 |
| - - Used as the value of the assembly attribute 'AssemblyFileVersion' |
24 |
| - generated by MSBuild. |
25 |
| - - If not specified: |
26 |
| - - If $(AbstractionsPackageVersion) is specified, use the numeric |
27 |
| - parts of its value, for example 1.0.0.345. |
28 |
| - - Otherwise, defaults to: |
29 |
| - $(DefaultMajorVersion).0.0.$(BuildNumber). |
30 |
| - --> |
31 |
| - |
32 |
| - <!-- The default major version number. --> |
33 |
| - <DefaultMajorVersion>1</DefaultMajorVersion> |
34 | 7 |
|
35 |
| - <!-- Determine the assembly file version. --> |
36 |
| - <!-- If AbstractionsAssemblyFileVersion is set, use its value as-is. --> |
37 |
| - <OurAssemblyFileVersion Condition="'$(AbstractionsAssemblyFileVersion)' != ''">$(AbstractionsAssemblyFileVersion)</OurAssemblyFileVersion> |
38 |
| - <!-- If AbstractionsPackageVersion is set, use its trimmed value. --> |
39 |
| - <OurAssemblyFileVersion Condition="'$(AbstractionsAssemblyFileVersion)' == '' and '$(AbstractionsPackageVersion)' != ''">$(AbstractionsPackageVersion.Split('-')[0])</OurAssemblyFileVersion> |
40 |
| - <!-- If neither property is set, use the default value.--> |
41 |
| - <OurAssemblyFileVersion Condition="'$(AbstractionsAssemblyFileVersion)' == '' and '$(AbstractionsPackageVersion)' == ''">$(DefaultMajorVersion).0.0.$(BuildNumber)</OurAssemblyFileVersion> |
42 |
| - |
43 |
| - <!-- Determine the package version. --> |
44 |
| - <OurPackageVersion Condition="'$(AbstractionsPackageVersion)' != ''">$(AbstractionsPackageVersion)</OurPackageVersion> |
45 |
| - <OurPackageVersion Condition="'$(AbstractionsPackageVersion)' == ''">$(DefaultMajorVersion).0.0.$(BuildNumber)-dev</OurPackageVersion> |
46 |
| - </PropertyGroup> |
| 8 | + Abstractions versioning information found in our sibling file |
| 9 | + AbstractionsVersions.props is imported via tools/props/Versions.props. |
| 10 | + --> |
47 | 11 |
|
48 | 12 | <!-- Target Config -->
|
49 | 13 | <PropertyGroup>
|
|
65 | 29 | We pin the AssemblyVersion of our package to the default major version
|
66 | 30 | number, with all remaining parts set to 0.
|
67 | 31 | -->
|
68 |
| - <AssemblyVersion>$(DefaultMajorVersion).0.0.0</AssemblyVersion> |
| 32 | + <AssemblyVersion>$(_DefaultMajorVersion).0.0.0</AssemblyVersion> |
69 | 33 |
|
70 |
| - <AssemblyFileVersion>$(OurAssemblyFileVersion)</AssemblyFileVersion> |
71 |
| - <FileVersion>$(OurAssemblyFileVersion)</FileVersion> |
72 |
| - <Version>$(OurPackageVersion)</Version> |
| 34 | + <AssemblyFileVersion>$(AbstractionsAssemblyFileVersion)</AssemblyFileVersion> |
| 35 | + <FileVersion>$(AbstractionsAssemblyFileVersion)</FileVersion> |
| 36 | + <Version>$(AbstractionsPackageVersion)</Version> |
73 | 37 | </PropertyGroup>
|
74 | 38 | <ItemGroup>
|
75 | 39 | <!-- Our API is CLS Compliant. -->
|
|
88 | 52 | -->
|
89 | 53 | <PropertyGroup>
|
90 | 54 | <PackageId>$(AssemblyName)</PackageId>
|
91 |
| - <PackageVersion>$(OurPackageVersion)</PackageVersion> |
| 55 | + <PackageVersion>$(AbstractionsPackageVersion)</PackageVersion> |
92 | 56 | <PackageOutputPath>$(PackagesDir)</PackageOutputPath>
|
93 | 57 | <IncludeSymbols>true</IncludeSymbols>
|
94 | 58 | <SymbolPackageFormat>snupkg</SymbolPackageFormat>
|
|
0 commit comments