7
7
<!-- Property that enables WriteVersionInfoToBuildLog -->
8
8
<WriteVersionInfoToBuildLog Condition =" '$(WriteVersionInfoToBuildLog)' == '' " >true</WriteVersionInfoToBuildLog >
9
9
10
- <!-- Property that enables GetVersion -->
10
+ <!-- Property that enables UpdateAssemblyInfo. Default to off for SDK builds -->
11
+ <UpdateAssemblyInfo Condition =" '$(UpdateAssemblyInfo)' == '' and '$(TargetFramework)' != '' " >false</UpdateAssemblyInfo >
12
+ <UpdateAssemblyInfo Condition =" '$(UpdateAssemblyInfo)' == '' " >true</UpdateAssemblyInfo >
13
+
11
14
<GetVersion Condition =" '$(GetVersion)' == '' " >true</GetVersion >
15
+
16
+
17
+ <!-- Property that enables setting of Version -->
18
+ <UpdateVersionProperties Condition =" '$(UpdateVersionProperties)' == '' " >true</UpdateVersionProperties >
19
+ <UseFullSemVerForNuGet Condition =" '$(UseFullSemVerForNuGet)' == '' " >false</UseFullSemVerForNuGet >
12
20
13
21
<GitVersionTaskLibrary >$(MSBuildThisFileDirectory)..\build\</GitVersionTaskLibrary >
14
22
</PropertyGroup >
23
31
TaskName =" GitVersionTask.WriteVersionInfoToBuildLog"
24
32
AssemblyFile =" $(GitVersionTaskLibrary)GitVersionTask.dll" />
25
33
26
- <Target Name =" WriteVersionInfoToBuildLog" BeforeTargets =" DispatchToInnerBuilds" Condition =" $(WriteVersionInfoToBuildLog) == 'true'" >
34
+ <Target Name =" WriteVersionInfoToBuildLog" BeforeTargets =" DispatchToInnerBuilds;GenerateNuspec " Condition =" $(WriteVersionInfoToBuildLog) == 'true'" >
27
35
<WriteVersionInfoToBuildLog SolutionDirectory =" $(SolutionDir)" NoFetch =" $(GitVersion_NoFetchEnabled)" />
28
36
</Target >
29
37
30
- <Target Name =" GetVersion" BeforeTargets =" DispatchToInnerBuilds" Condition =" $(GetVersion) == 'true'" >
38
+ <Target Name =" GetVersion" BeforeTargets =" DispatchToInnerBuilds;GenerateNuspec " Condition =" $(GetVersion) == 'true'" >
31
39
32
40
<GetVersion SolutionDirectory =" $(SolutionDir)" NoFetch =" $(GitVersion_NoFetchEnabled)" >
33
41
<Output TaskParameter =" Major" PropertyName =" GitVersion_Major" />
55
63
<Output TaskParameter =" CommitsSinceVersionSource" PropertyName =" GitVersion_CommitsSinceVersionSource" />
56
64
<Output TaskParameter =" CommitsSinceVersionSourcePadded" PropertyName =" GitVersion_CommitsSinceVersionSourcePadded" />
57
65
</GetVersion >
66
+
67
+ <PropertyGroup Condition =" '$(UpdateVersionProperties)' == 'true' " >
68
+ <Version >$(GitVersion_FullSemVer)</Version >
69
+ <VersionPrefix >$(GitVersion_MajorMinorPatch)</VersionPrefix >
70
+ <VersionSuffix Condition =" '$(UseFullSemVerForNuGet)' == 'false' " >$(GitVersion_NuGetPreReleaseTag)</VersionSuffix >
71
+ <VersionSuffix Condition =" '$(UseFullSemVerForNuGet)' == 'true' " >$(GitVersion_PreReleaseTag)</VersionSuffix >
72
+ <PackageVersion Condition =" '$(UseFullSemVerForNuGet)' == 'false' " >$(GitVersion_NuGetVersion)</PackageVersion >
73
+ <PackageVersion Condition =" '$(UseFullSemVerForNuGet)' == 'true' " >$(GitVersion_FullSemVer)</PackageVersion >
74
+ <InformationalVersion Condition =" '$(InformationalVersion)' == '' " >$(GitVersion_InformationalVersion)</InformationalVersion >
75
+ <AssemblyVersion Condition =" '$(AssemblyVersion)' == '' " >$(GitVersion_AssemblySemVer)</AssemblyVersion >
76
+ <FileVersion Condition =" '$(FileVersion)' == '' " >$(GitVersion_MajorMinorPatch).$(GitVersion_CommitsSinceVersionSource)</FileVersion >
77
+ </PropertyGroup >
58
78
59
79
</Target >
60
- </Project >
61
-
62
-
80
+ </Project >
0 commit comments