-
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathDirectory.Build.targets
35 lines (35 loc) · 1.72 KB
/
Directory.Build.targets
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
<?xml version="1.0" encoding="utf-8"?>
<Project>
<!--
Assembly step Description When performed
_______________|___________________________________________________________________|____________________
BeforeClean Executed before the standard clean target Before cleaning
Clean Standard cleaning target During cleaning
AfterClean Executed after the standard cleaning target After cleaning
BeforeBuild Executed before the start of the build process Before building
BeforeCompile Executed before compiling source code Before compilation
Compile Standard target object for compiling source code into object files During compilation
AfterCompile Executed after compilation is complete After compilation
Build Standard target object for building a project During building
AfterBuild Executed after the build process is complete After building
BeforeRebuild Executed before the start of the Rebuild process Before rebuilding
Rebuild Clean and Build sequence During rebuilding
AfterRebuild Executed after the Rebuild process is complete After rebuilding
-->
<!-- Setting the IsRebuild property before starting the rebuilding -->
<Target Name="SetRebuildFlag" BeforeTargets="BeforeRebuild">
<PropertyGroup>
<IsRebuild>true</IsRebuild>
</PropertyGroup>
</Target>
<!-- Standard cleaning target -->
<Target Name="CleanTargetDir" AfterTargets="Clean" Condition="'$(IsRebuild)' != 'true'">
<RemoveDir Directories="$(TargetDir)" ContinueOnError="true" />
</Target>
<!-- Resetting the IsRebuild property after cleaning -->
<Target Name="ResetRebuildFlag" AfterTargets="Clean">
<PropertyGroup>
<IsRebuild>false</IsRebuild>
</PropertyGroup>
</Target>
</Project>