|
1 | 1 | <?xml version="1.0" encoding="utf-8"?>
|
2 | 2 | <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
| 3 | + <PropertyGroup> |
| 4 | + <GitVersion_Task_targets_Imported>True</GitVersion_Task_targets_Imported> |
| 5 | + </PropertyGroup> |
3 | 6 | <PropertyGroup>
|
4 | 7 | <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">$(MSBuildProjectDirectory)\..\</SolutionDir>
|
| 8 | + <GitVersionPath Condition="'$(GitVersionPath)' == '' And '$(GitVersionUseSolutionDir)' == 'true'">$(SolutionDir)</GitVersionPath> |
| 9 | + <GitVersionPath Condition="'$(GitVersionPath)' == ''">$(MSBuildProjectDirectory)</GitVersionPath> |
| 10 | + <GitVersionCustomizeTargetFile Condition="'$(GitVersionCustomizeTargetFile)' == '' And Exists('$(MSBuildProjectDirectory)\GitVersionTask.targets')">$(SolutionDir)\GitVersionTask.targets</GitVersionCustomizeTargetFile> |
| 11 | + <GitVersionCustomizeTargetFile Condition="'$(GitVersionCustomizeTargetFile)' == '' And '$(SolutionDir)' != '' And Exists('$(SolutionDir)\GitVersionTask.targets')">$(SolutionDir)\GitVersionTask.targets</GitVersionCustomizeTargetFile> |
5 | 12 | <IntermediateOutputPath Condition="$(IntermediateOutputPath) == '' Or $(IntermediateOutputPath) == '*Undefined*'">$(MSBuildProjectDirectory)\obj\$(Configuration)\</IntermediateOutputPath>
|
6 | 13 | <GitVersion_NoFetchEnabled Condition="$(GitVersion_NoFetchEnabled) == ''">false</GitVersion_NoFetchEnabled>
|
7 | 14 |
|
|
32 | 39 | TaskName="GitVersionTask.WriteVersionInfoToBuildLog"
|
33 | 40 | AssemblyFile="$(GitVersionTaskLibrary)GitVersionTask.dll" />
|
34 | 41 |
|
| 42 | + <Import Project="$(GitVersionCustomizeTargetFile)" Condition="'$(GitVersionCustomizeTargetFile)' != '' and Exists($(GitVersionCustomizeTargetFile))" /> |
| 43 | + |
35 | 44 | <Target Name="WriteVersionInfoToBuildLog" BeforeTargets="CoreCompile;GetAssemblyVersion;GenerateNuspec" Condition="$(WriteVersionInfoToBuildLog) == 'true'">
|
36 |
| - <WriteVersionInfoToBuildLog SolutionDirectory="$(SolutionDir)" NoFetch="$(GitVersion_NoFetchEnabled)"/> |
| 45 | + <WriteVersionInfoToBuildLog SolutionDirectory="$(GitVersionPath)" NoFetch="$(GitVersion_NoFetchEnabled)"/> |
37 | 46 | </Target>
|
38 | 47 |
|
39 | 48 | <Target Name="UpdateAssemblyInfo" BeforeTargets="CoreCompile" Condition="$(UpdateAssemblyInfo) == 'true'">
|
40 | 49 | <UpdateAssemblyInfo
|
41 |
| - SolutionDirectory="$(SolutionDir)" |
| 50 | + SolutionDirectory="$(GitVersionPath)" |
42 | 51 | NoFetch="$(GitVersion_NoFetchEnabled)"
|
43 | 52 | ProjectFile="$(MSBuildProjectFullPath)"
|
44 | 53 | IntermediateOutputPath="$(IntermediateOutputPath)"
|
|
56 | 65 |
|
57 | 66 | <Target Name="GetVersion" BeforeTargets="CoreCompile;GetAssemblyVersion;GenerateNuspec" Condition="$(GetVersion) == 'true'">
|
58 | 67 |
|
59 |
| - <GetVersion SolutionDirectory="$(SolutionDir)" NoFetch="$(GitVersion_NoFetchEnabled)"> |
| 68 | + <GetVersion SolutionDirectory="$(GitVersionPath)" NoFetch="$(GitVersion_NoFetchEnabled)"> |
60 | 69 | <Output TaskParameter="Major" PropertyName="GitVersion_Major" />
|
61 | 70 | <Output TaskParameter="Minor" PropertyName="GitVersion_Minor" />
|
62 | 71 | <Output TaskParameter="Patch" PropertyName="GitVersion_Patch" />
|
|
0 commit comments