-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDirectory.Build.props
More file actions
146 lines (120 loc) · 6.21 KB
/
Directory.Build.props
File metadata and controls
146 lines (120 loc) · 6.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
<Project>
<Choose>
<When Condition="'$(Configuration)' == 'Canary'">
<PropertyGroup>
<Minor>$([System.DateTime]::Now.ToString(yy))</Minor>
<Build>$([System.DateTime]::Now.ToString(MM))</Build>
<Revision>$([System.DateTime]::Now.get_DayOfYear().ToString())</Revision>
<!--Version layout schema:
110 = Major
26 = Minor - Year of release
01 = Build - Month of release
1 = Revision - Day of release (day of year)
-beta = Indicates a pre-release package
-->
<LibraryVersion>110.$(Minor).$(Build).$(Revision)</LibraryVersion>
<!--https://docs.microsoft.com/en-us/nuget/create-packages/prerelease-packages-->
<PackageVersion>110.$(Minor).$(Build).$(Revision)-beta</PackageVersion>
</PropertyGroup>
</When>
<When Condition="'$(Configuration)' == 'Nightly'">
<PropertyGroup>
<Minor>$([System.DateTime]::Now.ToString(yy))</Minor>
<Build>$([System.DateTime]::Now.ToString(MM))</Build>
<Revision>$([System.DateTime]::Now.get_DayOfYear().ToString())</Revision>
<!--Version layout schema:
110 = Major
26 = Minor - Year of release
01 = Build - Month of release
1 = Revision - Day of release (day of year)
-alpha = Indicates a pre-release package
-->
<LibraryVersion>110.$(Minor).$(Build).$(Revision)</LibraryVersion>
<!--Nightly-->
<!--https://docs.microsoft.com/en-us/nuget/create-packages/prerelease-packages-->
<PackageVersion>110.$(Minor).$(Build).$(Revision)-alpha</PackageVersion>
</PropertyGroup>
</When>
<When Condition="'$(Configuration)' == 'Installer'">
<PropertyGroup>
<Minor>$([System.DateTime]::Now.ToString(yy))</Minor>
<Build>$([System.DateTime]::Now.ToString(MM))</Build>
<Revision>$([System.DateTime]::Now.get_DayOfYear().ToString())</Revision>
<!--Version layout schema:
110 = Major
26 = Minor - Year of release
01 = Build - Month of release
1 = Revision - Day of release (day of year)
-->
<!--As WIX installer can only cope with build numbers <= 266, the yyMM layout won't work.
Therefore, the build number for these packages will utilise the month number, assuming
that the major number will follow the latest .NET release number.-->
<LibraryVersion>110.$(Minor).$(Build).$(Revision)</LibraryVersion>
<PackageVersion>110.$(Minor).$(Build).$(Revision)</PackageVersion>
</PropertyGroup>
</When>
<Otherwise>
<PropertyGroup>
<Minor>$([System.DateTime]::Now.ToString(yy))</Minor>
<Build>$([System.DateTime]::Now.ToString(MM))</Build>
<Revision>$([System.DateTime]::Now.get_DayOfYear().ToString())</Revision>
<!--Version layout schema:
110 = Major
26 = Minor - Year of release
01 = Build - Month of release
1 = Revision - Day of release (day of year)
-->
<LibraryVersion>110.$(Minor).$(Build).$(Revision)</LibraryVersion>
<!--https://docs.microsoft.com/en-us/nuget/create-packages/prerelease-packages-->
<!--Stable-->
<PackageVersion>110.$(Minor).$(Build).$(Revision)</PackageVersion>
</PropertyGroup>
</Otherwise>
</Choose>
<PropertyGroup Condition="'$(TargetFramework)' == 'net10.0-windows'">
<GenerateResourceUsePreserializedResources>true</GenerateResourceUsePreserializedResources>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)' == 'Nightly'">
<DefineConstants>$(DefineConstants);NIGHTLY</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)' == 'Canary'">
<DefineConstants>$(DefineConstants);CANARY</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)' == 'Alpha'">
<DefineConstants>$(DefineConstants);ALPHA</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)' == 'Release'">
<DefineConstants>$(DefineConstants);RELEASE</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)' == 'LTS'">
<DefineConstants>$(DefineConstants);LTS</DefineConstants>
</PropertyGroup>
<!-- Authenticode Signing Configuration -->
<!--
Authenticode signing can be enabled by setting EnableAuthenticodeSigning=true
and providing the signing certificate information.
To enable signing, set these MSBuild properties:
- EnableAuthenticodeSigning=true
- AuthenticodeCertificatePath=path\to\certificate.pfx (or certificate in certificate store)
- AuthenticodeCertificatePassword=password (if using .pfx file, leave empty for certificate store)
- AuthenticodeCertificateThumbprint=thumbprint (if using certificate store instead of .pfx)
- AuthenticodeTimestampServer=http://timestamp.digicert.com (optional but recommended)
Example:
msbuild MyProject.csproj /p:EnableAuthenticodeSigning=true /p:AuthenticodeCertificatePath="cert.pfx" /p:AuthenticodeCertificatePassword="pwd"
-->
<PropertyGroup>
<!-- Enable Authenticode signing by default only for Release and Installer configurations -->
<EnableAuthenticodeSigning Condition="'$(EnableAuthenticodeSigning)' == '' And ('$(Configuration)' == 'Release' Or '$(Configuration)' == 'Installer')">false</EnableAuthenticodeSigning>
<EnableAuthenticodeSigning Condition="'$(EnableAuthenticodeSigning)' == ''">false</EnableAuthenticodeSigning>
<!-- Path to the code signing certificate (.pfx file) or leave empty to use certificate store -->
<AuthenticodeCertificatePath Condition="'$(AuthenticodeCertificatePath)' == ''"></AuthenticodeCertificatePath>
<!-- Password for .pfx certificate file, or empty if using certificate store -->
<AuthenticodeCertificatePassword Condition="'$(AuthenticodeCertificatePassword)' == ''"></AuthenticodeCertificatePassword>
<!-- Certificate thumbprint when using certificate store (requires AuthenticodeCertificatePath to be empty) -->
<AuthenticodeCertificateThumbprint Condition="'$(AuthenticodeCertificateThumbprint)' == ''"></AuthenticodeCertificateThumbprint>
<!-- Timestamp server URL (optional but recommended to ensure signature remains valid after certificate expiration) -->
<AuthenticodeTimestampServer Condition="'$(AuthenticodeTimestampServer)' == ''">http://timestamp.digicert.com</AuthenticodeTimestampServer>
<!-- Additional SignTool arguments -->
<AuthenticodeSignToolAdditionalArgs Condition="'$(AuthenticodeSignToolAdditionalArgs)' == ''"></AuthenticodeSignToolAdditionalArgs>
</PropertyGroup>
</Project>