|
1 | 1 | <?xml version="1.0" encoding="utf-8"?>
|
2 | 2 | <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
3 | 3 | <PropertyGroup>
|
4 |
| - <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">$(MSBuildProjectDirectory)..\</SolutionDir> |
5 |
| - <IntermediateOutputPath Condition="$(IntermediateOutputPath) == '' Or $(IntermediateOutputPath) == '*Undefined*'">$(MSBuildProjectDirectory)obj\$(Configuration)\</IntermediateOutputPath> |
| 4 | + <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">$(MSBuildProjectDirectory)\..\</SolutionDir> |
| 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)" NoFetch="$(GitVersion_NoFetchEnabled)"/> |
| 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 | + NoFetch="$(GitVersion_NoFetchEnabled)" |
| 37 | + ProjectFile="$(MSBuildProjectFullPath)" |
| 38 | + IntermediateOutputPath="$(IntermediateOutputPath)" |
| 39 | + RootNamespace="$(RootNamespace)" |
| 40 | + CompileFiles ="@(Compile)"> |
32 | 41 | <Output
|
33 | 42 | TaskParameter="AssemblyInfoTempFilePath"
|
34 | 43 | PropertyName="AssemblyInfoTempFilePath" />
|
|
37 | 46 | <ItemGroup>
|
38 | 47 | <Compile Include="$(AssemblyInfoTempFilePath)" />
|
39 | 48 | </ItemGroup>
|
40 |
| - |
| 49 | + </Target> |
| 50 | + |
| 51 | + <Target Name="GetVersion" BeforeTargets="CoreCompile" Condition="$(GetVersion) == 'true'"> |
41 | 52 |
|
42 | 53 | <GetVersion SolutionDirectory="$(SolutionDir)" NoFetch="$(GitVersion_NoFetchEnabled)">
|
43 | 54 | <Output TaskParameter="Major" PropertyName="GitVersion_Major" />
|
|
0 commit comments