forked from oracle/coherence-dotnet-extend-client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Coherence.msbuild
425 lines (334 loc) · 18.9 KB
/
Coherence.msbuild
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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2000, 2020, Oracle and/or its affiliates.
Licensed under the Universal Permissive License v 1.0 as shown at
http://oss.oracle.com/licenses/upl.
-->
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!-- MSBuild build script for Oracle Coherence for .NET -->
<!-- -->
<!-- Usage: -->
<!-- prompt> MsBuild.exe Coherence.msbuild /t:build -->
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!-- Global properties -->
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<Import Project="Coherence.properties"/>
<PropertyGroup>
<BuildTargetVersion Condition="'$(BuildTargetVersion)'==''">4.0</BuildTargetVersion>
<TargetFrameworkVersion>v$(BuildTargetVersion)</TargetFrameworkVersion>
<BuildVersion>$(AssemblyMajorVersion).$(AssemblyMinorVersion).$(AssemblyServicePack).$(AssemblyPatch)</BuildVersion>
<BuildDescription Condition="'$(BuildOfficial)' != ''">$(AssemblyDescriptions)</BuildDescription>
<BuildNumber Condition="'$(BuildOfficial)' == ''" >0</BuildNumber>
<BuildOracleVersion>$(AssemblyMajorVersion).$(AssemblyMinorVersion).$(AssemblyServicePack).$(ComponentVersion).$(Patch)</BuildOracleVersion>
<ProjectDir>$(MSBuildProjectDirectory)</ProjectDir>
<BuildDir>$(ProjectDir)\build</BuildDir>
<BinDir>$(ProjectDir)\bin</BinDir>
<DistDir>$(ProjectDir)\dist</DistDir>
<DistPatchesDir>$(DistDir)\patches\$(BuildVersion)</DistPatchesDir>
<DistVersionDir>$(DistDir)\$(BuildVersion)b$(BuildNumber)</DistVersionDir>
<DocDir>$(ProjectDir)\doc</DocDir>
<SetupDir>$(ProjectDir)\setup</SetupDir>
<SrcDir>$(ProjectDir)\src</SrcDir>
<TestsDir>$(ProjectDir)\tests</TestsDir>
<ToolsDir>$(ProjectDir)\tools</ToolsDir>
<PropertiesDir>$(SrcDir)\Coherence\Properties</PropertiesDir>
<ExtensionTasksPath>$(ToolsDir)\internal\msbuild\build\net40</ExtensionTasksPath>
<!--- Define where the nunit runner is located -->
<NunitExec>$(ToolsDir)\internal\nunit.runners\tools\nunit-console.exe</NunitExec>
</PropertyGroup>
<!-- Import the MSBuild extensions -->
<Import Project="$(ExtensionTasksPath)\MSBuild.Extension.Pack.targets"/>
<UsingTask TaskName="Oracle.MSBuild.Env"
AssemblyFile="$(ToolsDir)\msbuild-custom\CustomTasks.dll"/>
<UsingTask TaskName="Oracle.MSBuild.Run"
AssemblyFile="$(ToolsDir)\msbuild-custom\CustomTasks.dll"/>
<UsingTask TaskName="Oracle.MSBuild.Sleep"
AssemblyFile="$(ToolsDir)\msbuild-custom\CustomTasks.dll"/>
<!--- Import Sandcasle tools required to build documentation -->
<PropertyGroup>
<SandCastleDir>$(ToolsDir)\internal\shfb</SandCastleDir>
<SandCastleTasks>$(SandCastleDir)\SandcastleHelpFileBuilder.targets</SandCastleTasks>
<SHFBROOT>$(SandCastleDir)</SHFBROOT>
</PropertyGroup>
<!-- Import Sandcastle Tasks -->
<Import Project="$(SandCastleTasks)"/>
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!-- Global project Targets -->
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!-- Remove all build artifacts -->
<Target Name="Clean">
<ItemGroup>
<Files Include="$(BuildDir)"/>
<Files Include="$(SrcDir)\Coherence\bin"/>
<Files Include="$(SrcDir)\Coherence\obj"/>
<Files Include="$(TestsDir)\Coherence.Tests\bin"/>
<Files Include="$(TestDir)\Coherence.Tests\obj"/>
<Dist Include="$(DistVersionDir)"/>
<Dist Include="$(DistDir)\coherence-net-$(BuildOracleVersion)b$(BuildNumber).zip"/>
</ItemGroup>
<RemoveDir ContinueOnError="true" Directories="@(Files)"/>
<Delete Condition="'$(ClearDist)' != ''" ContinueOnError="true" Files="@(Dist)"/>
<Delete ContinueOnError="true" Files="$(ProjectDir)\AssemblyInfo.cs" />
</Target>
<!-- Build Target -->
<Target Name="Build" DependsOnTargets="GenerateAssembly">
<MakeDir Directories="$(BuildDir)"/>
<ItemGroup>
<BuildProjects Include="$(ProjectDir)\Coherence.2010.sln">
<Properties>Configuration=$(BuildType);TargetFrameworkVersion=$(TargetFrameworkVersion)</Properties>
</BuildProjects>
</ItemGroup>
<Message Text="Build target version $(TargetFrameworkVersion)"/>
<MSBuild BuildInParallel="true" Projects="@(BuildProjects)" Properties="Configuration=$(BuildType);TargetFramework=$(TargetFrameworkVersion)"/>
<CallTarget Targets="RevertAssemblyInfo"/>
</Target>
<!-- Ensure the test server Target -->
<Target Name="Ensure-Test-Server" DependsOnTargets="InstallCerts">
<Oracle.MSBuild.Run Command="ensure-test-server.cmd" UseShellExecute="true"
WorkingDirectory="$(BinDir)" WaitForExit="true"/>
</Target>
<!-- Stop the test server Target -->
<Target Name="Stop-Test-Server" DependsOnTargets="RemoveCerts">
<Oracle.MSBuild.Run Command="stop-test-server.cmd $(CachePort)" UseShellExecute="true"
WorkingDirectory="$(BinDir)" WaitForExit="true"/>
</Target>
<!-- Install certificates -->
<Target Name="InstallCerts">
<Exec Command="$(ToolsDir)\internal\resourcekit\winhttpcertcfg.exe -i $(TestsDir)\Coherence.Tests\Net\Ssl\CA.pfx -p password -c LOCAL_MACHINE\My -a "$(USERNAME)""/>
<Exec Command="$(ToolsDir)\internal\resourcekit\winhttpcertcfg.exe -i $(TestsDir)\Coherence.Tests\Net\Ssl\Server.pfx -p password -c LOCAL_MACHINE\My -a "$(USERNAME)""/>
<Exec Command="$(ToolsDir)\internal\resourcekit\winhttpcertcfg.exe -i $(TestsDir)\Coherence.Tests\Net\Ssl\Client.pfx -p password -c LOCAL_MACHINE\My -a "$(USERNAME)""/>
<Exec Command="certmgr.exe -add $(TestsDir)\Coherence.Tests\Config\testcert.cer -c -n TestCert -s -r localMachine root" />
</Target>
<Target Name="RemoveCerts">
<Exec ContinueOnError="true" Command="certmgr.exe -del -c -n "MyClient" -s -r localMachine my" />
<Exec ContinueOnError="true" Command="certmgr.exe -del -c -n "MyServerName" -s -r localMachine my"/>
<Exec ContinueOnError="true" Command="certmgr.exe -del -c -n "Test And Dev Root Authority" -s -r localMachine root"/>
<Exec Command="certmgr.exe -del -c -n TestCert -s -r localMachine root" />
</Target>
<!-- Test Target -->
<Target Name="Test" DependsOnTargets="Ensure-Test-Server" >
<PropertyGroup>
<TestTargetVersion Condition="'$(TestTargetVersion)' == ''" >4.0</TestTargetVersion>
</PropertyGroup>
<Exec IgnoreExitCode="False" Command="$(NunitExec) /xml:all-tests.xml /framework:net-$(TestTargetVersion) $(BuildDir)\Coherence.Tests.2010\$(BuildType)\Coherence.Tests.dll"/>
<CallTarget Targets="Stop-Test-Server"/>
<OnError ExecuteTargets="Stop-Test-Server"/>
</Target>
<Target Name="Test-Standard" DependsOnTargets="Ensure-Test-Server" >
<PropertyGroup>
<TestTargetVersion Condition="'$(TestTargetVersion)' == ''" >4.0</TestTargetVersion>
</PropertyGroup>
<Exec IgnoreExitCode="False" Command="$(NunitExec) /xml:stdandard-tests.xml /framework:net-$(TestTargetVersion) $(BuildDir)\Coherence.Tests.2010\$(BuildType)\Coherence.Tests.dll /exclude:Security"/>
<CallTarget Targets="Stop-Test-Server"/>
<OnError ExecuteTargets="Stop-Test-Server"/>
</Target>
<Target Name="Test-Security" DependsOnTargets="Ensure-Test-Server" >
<PropertyGroup>
<TestTargetVersion Condition="'$(TestTargetVersion)' == ''" >4.0</TestTargetVersion>
</PropertyGroup>
<Exec IgnoreExitCode="False" Command="$(NunitExec ) /xml:security-tests.xml /framework:net-$(TestTargetVersion) $(BuildDir)\Coherence.Tests.2010\$(BuildType)\Coherence.Tests.dll /include:Security"/>
<CallTarget Targets="Stop-Test-Server"/>
<OnError ExecuteTargets="Stop-Test-Server"/>
</Target>
<Target Name="Test-Full" DependsOnTargets="Ensure-Test-Server" >
<PropertyGroup>
<TestTargetVersion Condition="'$(TestTargetVersion)' == ''" >4.0</TestTargetVersion>
</PropertyGroup>
<Exec IgnoreExitCode="False" Command="$(NunitExec) /xml:all-tests.xml /framework:net-$(TestTargetVersion) $(BuildDir)\Coherence.Tests.2010\$(BuildType)\Coherence.Tests.dll"/>
<Oracle.MSBuild.Sleep Timeout="60000" />
<Exec IgnoreExitCode="False" Command="$(NunitExec) /xml:all-tests.xml /framework:net-4.0 $(BuildDir)\Coherence.Tests.2010\$(BuildType)\Coherence.Tests.dll"/>
<CallTarget Targets="Stop-Test-Server"/>
<OnError ExecuteTargets="Stop-Test-Server"/>
</Target>
<!-- Documentation target -->
<Target Name="Doc" DependsOnTargets="Build">
<Exec IgnoreExitCode="false" Command="MSBuild.exe /p:Configuration=$(BuildType) $(SrcDir)\Coherence\Help2019.shfbproj"/>
</Target>
<!-- Main distribution target -->
<Target Name="Dist" DependsOnTargets="Doc">
<MakeDir Directories="$(DistDir)"/>
<MakeDir Directories="$(DistVersionDir)"/>
<MSBuild.ExtensionPack.Framework.Guid TaskAction="Create">
<Output TaskParameter="FormattedGuidString" PropertyName="ProductGuid"/>
</MSBuild.ExtensionPack.Framework.Guid>
<MSBuild.ExtensionPack.Framework.TextString TaskAction="ToUpper" OldString="$(ProductGuid)">
<Output PropertyName="ProductGuid" TaskParameter="NewString"/>
</MSBuild.ExtensionPack.Framework.TextString>
<PropertyGroup>
<ProductName Condition="'$(BuildOfficial)' == ''">coherence-net-$(BuildDescription)</ProductName>
<ProductName Condition="'$(BuildOfficial)' != ''">coherence-net-$(BuildOracleVersion)</ProductName>
<OutFileName>Coherence.msi</OutFileName>
<LogFileName>Coherence.msi.log</LogFileName>
<MsiFileName>$(ProductName).msi</MsiFileName>
<ZipFileName>$(ProductName)b$(BuildNumber).zip</ZipFileName>
<OutFile>$(BuildDir)\$(OutFileName)</OutFile>
<LogFile>$(BuildDir)\$(LogFileName)</LogFile>
<MsiFile>$(DistVersionDir)\$(MsiFileName)</MsiFile>
<ZipFile>$(DistDir)\$(ZipFileName)</ZipFile>
</PropertyGroup>
<Delete Files="$(OutFile);$(LogFile);$(ZipFile)"/>
<ItemGroup>
<MetaDataFile Include="$(SrcDir)\Coherence\product.xml"/>
<MetaDataFileDest Include="$(BuildDir)\product.xml"/>
<SetupFile Include="$(SetupDir)\Coherence.Setup\Coherence.Setup.Template.2010.vdproj"/>
<SetupFileDest Include="$(SetupDir)\Coherence.Setup\Coherence.Setup.2010.vdproj" />
</ItemGroup>
<ItemGroup>
<TokenValues Include="VERSION">
<Replacement>$(BuildOracleVersion)</Replacement>
</TokenValues>
<TokenValues Include="DESCRIPTION">
<Replacement>$(AssemblyDescription)</Replacement>
</TokenValues>
<SetupTokens Include="INSTALLER_VERSION">
<Replacement>$(AssemblyMajorVersion).$(AssemblyMinorVersion).$(AssemblyServicePack)$(AssemblyPatch)</Replacement>
</SetupTokens>
<SetupTokens Include="PRODUCT_VERSION">
<Replacement>$(BuildVersion)</Replacement>
</SetupTokens>
<SetupTokens Include="PRODUCT_GUID">
<Replacement>$(ProductGuid)</Replacement>
</SetupTokens>
</ItemGroup>
<!-- Copy the OPatch product metadata file -->
<Copy SourceFiles="@(MetaDataFile)" DestinationFiles="@(MetaDataFileDest)"/>
<MSBuild.ExtensionPack.FileSystem.Detokenise TaskAction="Detokenise"
TargetFiles="@(MetaDataFileDest)" ReplacementValues="@(TokenValues)"/>
<!-- Parameterize the setup project -->
<Delete Files="@(SetupFileDest)"/>
<Copy SourceFiles="@(SetupFile)" DestinationFiles="@(SetupFileDest)"/>
<MSBuild.ExtensionPack.FileSystem.Detokenise TaskAction="Detokenise"
TargetFiles="@(SetupFileDest)" ReplacementValues="@(SetupTokens)"/>
<Exec Command="devenv.exe @(SetupFileDest) /build $(BuildType) /out $(LogFile)"/>
<Error Condition="!Exists($(OutFile))" Text="The MSI failed to build. See $(LogFile) for more details."/>
<Copy SourceFiles="$(OutFile)" DestinationFiles="$(MsiFile)"/>
<!-- Copy the metalink readme and update it with the appropriate information -->
<PropertyGroup>
<ReadmeFileName>README.md</ReadmeFileName>
<ReadmeFileName Condition=" '$(BuildDescription)'=='prerelease' ">readme-prerelease.txt</ReadmeFileName>
</PropertyGroup>
<ItemGroup>
<ReadmeFile Include="$(ReadmeFileName)"/>
<ReadmeFileDest Include="$(DistVersionDir)\$(ReadmeFileName)"/>
</ItemGroup>
<Copy SourceFiles="@(ReadmeFile)" DestinationFiles="@(ReadmeFileDest)"/>
<MSBuild.ExtensionPack.FileSystem.Detokenise TaskAction="Detokenise"
TargetFiles="@(ReadmeFileDest)" ReplacementValues="@(TokenValues)"/>
<ItemGroup>
<ZipFiles Include="@(ReadmeFileDest)"/>
<ZipFiles Include="$(MsiFile)"/>
</ItemGroup>
<MSBuild.ExtensionPack.Compression.Zip TaskAction="Create" CompressFiles="@(ZipFiles)"
RemoveRoot="$(DistVersionDir)" ZipFileName="$(ZipFile)" />
</Target>
<!-- Escrow target -->
<Target Name="Escrow" DependsOnTargets="Clean" >
<ItemGroup>
<EscrowFile Include="$(DistDir)\escrow-net-$(BuildOracleVersion).zip"/>
<ZipFiles Include="$(ProjectDir)\**\*"
Exclude="$(DistDir)\**\*; $(ProjectDir)\**\*.suo; $(ProjectDir)\**\*.user; $(ProjectDir)\**\*.xsx; $(ProjectDir)\**\_ReSharper*\**; $(ProjectDir)\**\obj\**; $(ProjectDir)\**\bin\**"/>
</ItemGroup>
<Delete Files="@(EscrowFile)"/>
<MSBuild.ExtensionPack.Compression.Zip TaskAction="Create" CompressFiles="@(ZipFiles)"
CompressPath="$(ProjectDir)" RemoveRoot="$(ProjectDir)"
ZipFileName="@(EscrowFile)" />
</Target>
<!-- ADE target -->
<Target Name="ADE" DependsOnTargets="Clean" >
<!-- Create the archive of our source tree for publication to ADE -->
<ItemGroup>
<AdeFile Include="$(BuildDir)\ade.zip"/>
<ZipFiles Include="$(ProjectDir)\**"
Exclude="$(DistDir)\**; $(ToolsDir)\jdk\**; $(ProjectDir)\**\*.suo; $(ProjectDir)\**\*.user; $(ProjectDir)\**\*.xsx; $(ProjectDir)\**\_ReSharper*\**; $(ProjectDir)\**\obj\**; $(ProjectDir)\**\bin\**"/>
<ZipDest Include="$(DistDir)\coh\cs"/>
</ItemGroup>
<RemoveDir Directories="@(Dist)"/>
<MakeDir Directories="@(ZipDest)"/>
<Delete Files="@(AdeFile)"/>
<MakeDir Directories="$(BuildDir)"/>
<Copy SourceFiles="@(ZipFiles)" DestinationFolder="@(ZipDest)"/>
<MSBuild.ExtensionPack.Compression.Zip TaskAction="Create"
CompressPath="$(DistDir)" RemoveRoot="$(DistDir)" ZipFileName="@(AdeFile)" />
<!-- Copy the archive over to the remote system -->
<Exec Command="pscp -v -pw $(ScpPassword) @(AdeFile) $(ScpUser)@$(ScpHost):$(ScpRemotePath)"/>
<!-- Unzip the archive on the remote system and make sure the permissions are set correctly -->
<Exec Command="plink -v -l $(ScpUser) -pw $(ScpPassword) $(ScpHost) cd $(ScpRemotePath); unzip ade.zip; rm ade.zip; chmod -R 755 coh/cs"/>
<!-- Clean up -->
<Delete Files="@(AdeFile)"/>
</Target>
<!-- Patch target -->
<Target Name="Patch" >
<!-- Make sure this is a patch build -->
<PropertyGroup>
<BuildVersionPatch>$(AssemblyPatch)</BuildVersionPatch>
</PropertyGroup>
<Error Condition="'$(BuildVersionPatch)' == '0'" Text="Not a patch build: $(BuildVersion)"/>
<Error Condition="'$(BuildVersionPatch)' == ''" Text="Not a patch build: $(BuildVersion)"/>
<PropertyGroup>
<PatchName>cohnet-$(AssemblyMajorVersion)$(AssemblyMinorVersion)$(AssemblyServicePack)-patch-$(BuildVersionPatch)</PatchName>
<PatchDir>$(DistPatchesDir)</PatchDir>
<PatchFile>$(PatchDir)\$(PatchName).zip</PatchFile>
<BinDir>$(PatchDir)\bin</BinDir>
<Root>$(PatchDir)\</Root>
</PropertyGroup>
<Message Text="Building patch: $(PatchName) in $(PatchDir)"/>
<Error Condition="!Exists($(PatchDir))" Text="Missing patch directory: $(PatchDir)"/>
<!-- Create the patch -->
<Delete Files="@(PatchFile)"/>
<MakeDir Directories="$(BinDir)"/>
<ItemGroup>
<BinFiles Include="$(BuildDir)\Coherence.2010\$(BuildType)\Coherence.*" />
</ItemGroup>
<Copy SourceFiles="@(BinFiles)" DestinationFolder="$(BinDir)"/>
<ItemGroup>
<ZipFiles Include="$(DistPatchesDir)\$(ReadmeFileName)"/>
<ZipFiles Include="$(BinDir)\**"/>
</ItemGroup>
<MSBuild.ExtensionPack.Compression.Zip TaskAction="Create"
CompressFiles="@(ZipFiles)" ZipFileName="$(PatchFile)" RemoveRoot="$(Root)" />
<RemoveDir Directories="$(BinDir)" />
</Target>
<!-- Generate a AssemblyInfo.cs file -->
<Target Name="GenerateAssembly" DependsOnTargets="SaveAssemblyInfo">
<ItemGroup>
<AssemblyInfoFiles Include="$(PropertiesDir)\AssemblyInfo.cs"/>
</ItemGroup>
<MSBuild.ExtensionPack.Framework.DateAndTime TaskAction="Get" Format="MMdd.yyyy.hhmm">
<Output TaskParameter="Result" PropertyName="BuildDate"/>
</MSBuild.ExtensionPack.Framework.DateAndTime>
<PropertyGroup>
<BuildDescription Condition="'$(BuildOfficial)' == ''" >Internal-$(COMPUTERNAME)-$(BuildDate)</BuildDescription>
<BuildDescription Condition="'$(BuildOfficial)' != ''" >$(AssemblyDescription)</BuildDescription>
<AssemblyDescription>$(BuildVersion) $(BuildDescription) Build $(BuildNumber)</AssemblyDescription>
</PropertyGroup>
<MSBuild.ExtensionPack.Framework.AssemblyInfo
AssemblyConfiguration="$(BuildType)"
AssemblyInfoFiles="@(AssemblyInfoFiles)"
AssemblyCompany="Oracle"
AssemblyCopyright="Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved."
AssemblyDescription="$(AssemblyDescription)"
AssemblyKeyFile="src\Coherence\Coherence-AssemblyKey.snk"
AssemblyKeyName=""
AssemblyProduct="Oracle Coherence for .NET"
AssemblyTitle="Oracle Coherence for .NET $(AssemblyDescription)"
ComVisible="true"
AssemblyTrademark="Oracle Corporation"
AssemblyMajorVersion="$(AssemblyMajorVersion)"
AssemblyFileMajorVersion="$(AssemblyMajorVersion)"
AssemblyMinorVersion="$(AssemblyMinorVersion)"
AssemblyFileMinorVersion="$(AssemblyMinorVersion)"
AssemblyRevision="$(AssemblyPatch)"
AssemblyFileRevision="$(AssemblyPatch)"
AssemblyBuildNumber="$(AssemblyServicePack)"
AssemblyFileBuildNumber="$(AssemblyServicePack)"/>
</Target>
<Target Name="SaveAssemblyInfo" Condition="!Exists('$(ProjectDir)\AssemblyInfo.cs')">
<Copy SourceFiles="$(PropertiesDir)\AssemblyInfo.cs" DestinationFiles="$(ProjectDir)\AssemblyInfo.cs"/>
</Target>
<Target Name="RevertAssemblyInfo">
<Copy OverwriteReadOnlyFiles="true" SourceFiles="$(ProjectDir)\AssemblyInfo.cs" DestinationFiles="$(PropertiesDir)\AssemblyInfo.cs"/>
<Delete Files="$(ProjectDir)\AssemblyInfo.cs" />
</Target>
</Project>