|
4 | 4 | <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">$(MSBuildProjectDirectory)..\</SolutionDir>
|
5 | 5 | <IntermediateOutputPath Condition="$(IntermediateOutputPath) == '' Or $(IntermediateOutputPath) == '*Undefined*'">$(MSBuildProjectDirectory)obj\$(Configuration)\</IntermediateOutputPath>
|
6 | 6 | <GitVersion_NoFetchEnabled Condition="$(GitVersion_NoFetchEnabled) == ''">false</GitVersion_NoFetchEnabled>
|
| 7 | + |
| 8 | + <!-- Property that enables WriteVersionInfoToBuildLog --> |
| 9 | + <WriteVersionInfoToBuildLog Condition=" '$(WriteVersionInfoToBuildLog)' == '' ">true</WriteVersionInfoToBuildLog> |
| 10 | + |
| 11 | + <!-- Property that enables UpdateAssemblyInfo --> |
| 12 | + <UpdateAssemblyInfo Condition=" '$(UpdateAssemblyInfo)' == '' ">true</UpdateAssemblyInfo> |
| 13 | + |
| 14 | + <!-- Property that enables GetVersion --> |
| 15 | + <GetVersion Condition=" '$(GetVersion)' == '' ">true</GetVersion> |
| 16 | + |
7 | 17 | </PropertyGroup>
|
8 | 18 |
|
9 | 19 | <UsingTask
|
10 | 20 | TaskName="GitVersionTask.UpdateAssemblyInfo"
|
11 | 21 | AssemblyFile="$(MSBuildThisFileDirectory)..\..\GitVersionTask.dll" />
|
12 |
| - <UsingTask |
13 |
| - TaskName="GitVersionTask.GetVersion" |
| 22 | + <UsingTask |
| 23 | + TaskName="GitVersionTask.GetVersion" |
14 | 24 | AssemblyFile="$(MSBuildThisFileDirectory)..\..\GitVersionTask.dll" />
|
15 | 25 | <UsingTask
|
16 | 26 | TaskName="GitVersionTask.WriteVersionInfoToBuildLog"
|
17 | 27 | AssemblyFile="$(MSBuildThisFileDirectory)..\..\GitVersionTask.dll" />
|
18 | 28 |
|
19 |
| - <Target Name="UpdateAssemblyInfo" |
20 |
| - BeforeTargets="CoreCompile"> |
21 |
| - <WriteVersionInfoToBuildLog |
22 |
| - SolutionDirectory="$(SolutionDir)" |
23 |
| - NoFetch="$(GitVersion_NoFetchEnabled)" |
24 |
| - /> |
| 29 | + <Target Name="WriteVersionInfoToBuildLog" BeforeTargets="CoreCompile" Condition="$(WriteVersionInfoToBuildLog) == 'true'"> |
| 30 | + <WriteVersionInfoToBuildLog SolutionDirectory="$(SolutionDir)" /> |
| 31 | + </Target> |
| 32 | + |
| 33 | + <Target Name="UpdateAssemblyInfo" BeforeTargets="CoreCompile" Condition="$(UpdateAssemblyInfo) == 'true'"> |
25 | 34 | <UpdateAssemblyInfo
|
26 |
| - SolutionDirectory="$(SolutionDir)" |
27 |
| - NoFetch="$(GitVersion_NoFetchEnabled)" |
28 |
| - ProjectFile="$(MSBuildProjectFullPath)" |
29 |
| - IntermediateOutputPath="$(IntermediateOutputPath)" |
30 |
| - RootNamespace="$(RootNamespace)" |
31 |
| - CompileFiles ="@(Compile)"> |
| 35 | + SolutionDirectory="$(SolutionDir)" |
| 36 | + ProjectFile="$(MSBuildProjectFullPath)" |
| 37 | + IntermediateOutputPath="$(IntermediateOutputPath)" |
| 38 | + RootNamespace="$(RootNamespace)" |
| 39 | + CompileFiles ="@(Compile)"> |
32 | 40 | <Output
|
33 | 41 | TaskParameter="AssemblyInfoTempFilePath"
|
34 | 42 | PropertyName="AssemblyInfoTempFilePath" />
|
|
37 | 45 | <ItemGroup>
|
38 | 46 | <Compile Include="$(AssemblyInfoTempFilePath)" />
|
39 | 47 | </ItemGroup>
|
40 |
| - |
| 48 | + </Target> |
| 49 | + |
| 50 | + <Target Name="GetVersion" BeforeTargets="CoreCompile" Condition="$(GetVersion) == 'true'"> |
41 | 51 |
|
42 | 52 | <GetVersion SolutionDirectory="$(SolutionDir)" NoFetch="$(GitVersion_NoFetchEnabled)">
|
43 | 53 | <Output TaskParameter="Major" PropertyName="GitVersion_Major" />
|
|
0 commit comments