Minimize calls into GitInfo by caching results during build_init
Rob Mensching committed
Nov 10, 2022 at 23:35 UTC
c8a832c931f6c34892e596a11c14e9181d5eee16
64 files changed
+71
-77
.gitignore
+2
@@ -393,6 +393,8 @@ FodyWeavers.xsd
393
# Ignore global.json and Directory.Package.props since they are generated
394
global.json
395
Directory.Packages.props
396
+build/wixver.props
397
+build/ThisAssembly.WixVer.cs
398
399
# Ignore downloaded tools
400
build/.tools/
src/Directory.Build.targets
+8
-1
@@ -17,6 +17,9 @@
17
<ProjectCapability Remove="TestContainer" />
18
</ItemGroup>
19
20
+ <!-- If the GitInfo package wasn't imported, use the calculated version properties. -->
21
+ <Import Project="$(RootBuildFolder)wixver.props" Condition=" '$(GitInfoImported)'!='true' " />
22
+
23
<Target Name="__FixupGitBaseVersion" BeforeTargets="_GitPopulateVersionInfo">
24
<PropertyGroup>
25
<GitBaseVersion>$(GitBaseVersion.Replace('{apiversion}', '$(ApiVersion)'))</GitBaseVersion>
@@ -30,9 +33,13 @@
33
$(GetPackageVersionDependsOn);
34
__SetPropertiesFromGit;
35
</GetPackageVersionDependsOn>
36
+
37
+ <__SetPropertiesFromGitDependsOn Condition=" '$(GitInfoFromCache)'!='true' ">
38
+ GitVersion
39
+ </__SetPropertiesFromGitDependsOn>
40
</PropertyGroup>
41
35
- <Target Name="__SetPropertiesFromGit" DependsOnTargets="GitVersion" Condition=" '$(GitInfoImported)'=='true' ">
42
+ <Target Name="__SetPropertiesFromGit" DependsOnTargets="$(__SetPropertiesFromGitDependsOn)">
43
<PropertyGroup>
44
<AssemblyVersion>$(GitBaseVersionMajor).$(GitBaseVersionMinor).0.0</AssemblyVersion>
45
<FileVersion>$(GitBaseVersionMajor).$(GitBaseVersionMinor).$(GitBaseVersionPatch).$(GitCommits)</FileVersion>
src/Directory.csproj.targets
+6
-1
@@ -8,8 +8,14 @@
8
<CreateDocumentation Condition=" '$(CreateDocumentationFile)'!='true' ">false</CreateDocumentation>
9
<DocumentationFile Condition=" '$(CreateDocumentationFile)'=='true' ">$(OutputPath)\$(AssemblyName).xml</DocumentationFile>
10
<DefineConstants Condition=" '$(Configuration)'=='Debug' ">$(DefineConstants);DEBUG</DefineConstants>
11
+
12
+ <WixVersionThisAssemblyFile>$(RootBuildFolder)ThisAssembly.WixVer.cs</WixVersionThisAssemblyFile>
13
</PropertyGroup>
14
15
+ <ItemGroup Condition=" '$(IncludeThisAssembly)'=='true' ">
16
+ <Compile Include="$(WixVersionThisAssemblyFile)" />
17
+ </ItemGroup>
18
+
19
<Target Name="__SetAssemblyInfoFromGit" DependsOnTargets="__SetPropertiesFromGit" BeforeTargets="GetAssemblyVersion" />
20
21
<PropertyGroup Condition=" '$(IsWixTestProject)'=='true' ">
@@ -26,6 +32,5 @@
32
33
<ItemGroup Condition=" '$(IsWixTestProject)'!='true' ">
34
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
29
- <PackageReference Include="GitInfo" PrivateAssets="All" />
35
</ItemGroup>
36
</Project>
src/Directory.vcxproj.targets
+1
-1
@@ -10,7 +10,7 @@
10
</PropertyGroup>
11
12
<Target Name="__SetVersionResource" DependsOnTargets="__SetPropertiesFromGit"
13
- Condition=" '$(GitInfoImported)'=='true' and ('$(ConfigurationType)'=='Application' or '$(ConfigurationType)'=='DynamicLibrary') ">
13
+ Condition=" '$(ConfigurationType)'=='Application' or '$(ConfigurationType)'=='DynamicLibrary' ">
14
<PropertyGroup>
15
<_ResourceFileType Condition=" '$(ConfigurationType)'=='Application' ">VFT_APP</_ResourceFileType>
16
<_ResourceFileType Condition=" '$(ConfigurationType)'=='DynamicLibrary' ">VFT_DLL</_ResourceFileType>
src/api/burn/WixToolset.BootstrapperCore.Native/WixToolset.BootstrapperCore.Native.proj
-1
@@ -10,7 +10,6 @@
10
11
<ItemGroup>
12
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
13
- <PackageReference Include="GitInfo" PrivateAssets="All" />
13
</ItemGroup>
14
15
<Target Name="Pack"
src/api/burn/balutil/balutil.vcxproj
-1
@@ -82,7 +82,6 @@
82
83
<ItemGroup>
84
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
85
- <PackageReference Include="GitInfo" PrivateAssets="All" />
85
86
<PackageReference Include="WixToolset.DUtil" />
87
</ItemGroup>
src/api/burn/bextutil/bextutil.vcxproj
-1
@@ -71,7 +71,6 @@
71
72
<ItemGroup>
73
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
74
- <PackageReference Include="GitInfo" PrivateAssets="All" />
74
75
<PackageReference Include="WixToolset.DUtil" />
76
</ItemGroup>
src/api/burn/mbanative/mbanative.vcxproj
-1
@@ -67,7 +67,6 @@
67
68
<ItemGroup>
69
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
70
- <PackageReference Include="GitInfo" PrivateAssets="All" />
70
71
<PackageReference Include="WixToolset.DUtil" />
72
</ItemGroup>
src/burn/engine/engine.vcxproj
+1
-2
@@ -180,7 +180,7 @@ rc.exe -fo "$(OutDir)engine.res" "$(IntDir)engine.messages.rc"</Command>
180
#endif
181
"/>
182
</ItemGroup>
183
-
183
+
184
<WriteLinesToFile Overwrite="true" File="$(BurnGeneratedHeaderDirectory)engine.version.h" Lines="@(BurnVersionLines)" />
185
</Target>
186
@@ -188,7 +188,6 @@ rc.exe -fo "$(OutDir)engine.res" "$(IntDir)engine.messages.rc"</Command>
188
<PackageReference Include="WixToolset.DUtil" />
189
190
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
191
- <PackageReference Include="GitInfo" PrivateAssets="All" />
191
</ItemGroup>
192
193
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
src/burn/stub/stub.vcxproj
-1
@@ -91,7 +91,6 @@
91
92
<ItemGroup>
93
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
94
- <PackageReference Include="GitInfo" PrivateAssets="All" />
94
95
<PackageReference Include="WixToolset.DUtil" />
96
</ItemGroup>
src/dtf/SfxCA/SfxCA.vcxproj
-1
@@ -72,7 +72,6 @@
72
73
<ItemGroup>
74
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
75
- <PackageReference Include="GitInfo" PrivateAssets="All" />
75
</ItemGroup>
76
77
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
src/ext/Bal/Samples/bafunctions/bafunctions.vcxproj
-1
@@ -63,7 +63,6 @@
63
<PackageReference Include="WixToolset.BalUtil" />
64
65
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
66
- <PackageReference Include="GitInfo" PrivateAssets="All" />
66
</ItemGroup>
67
68
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
src/ext/Bal/WixToolset.Dnc.HostGenerator/WixToolset.Dnc.HostGenerator.csproj
+1
-1
@@ -9,7 +9,7 @@
9
<Title>WiX Toolset .NET Core BA Host Generator</Title>
10
<DebugType>embedded</DebugType>
11
<PlatformTarget>AnyCPU</PlatformTarget>
12
- <GitThisAssembly>true</GitThisAssembly>
12
+ <IncludeThisAssembly>true</IncludeThisAssembly>
13
</PropertyGroup>
14
15
<ItemGroup>
src/ext/Bal/dnchost/dnchost.vcxproj
-1
@@ -83,7 +83,6 @@
83
<PackageReference Include="WixToolset.BalUtil" />
84
85
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
86
- <PackageReference Include="GitInfo" PrivateAssets="All" />
86
</ItemGroup>
87
88
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
src/ext/Bal/mbahost/mbahost.vcxproj
-1
@@ -71,7 +71,6 @@
71
<PackageReference Include="WixToolset.BalUtil" />
72
73
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
74
- <PackageReference Include="GitInfo" PrivateAssets="All" />
74
</ItemGroup>
75
76
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
src/ext/Bal/test/examples/TestEngine/Example.TestEngine.vcxproj
-1
@@ -64,7 +64,6 @@
64
<PackageReference Include="WixToolset.BalUtil" />
65
66
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
67
- <PackageReference Include="GitInfo" PrivateAssets="All" />
67
</ItemGroup>
68
69
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
src/ext/Bal/wixiuiba/wixiuiba.vcxproj
-1
@@ -65,7 +65,6 @@
65
<PackageReference Include="WixToolset.BalUtil" />
66
67
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
68
- <PackageReference Include="GitInfo" PrivateAssets="All" />
68
</ItemGroup>
69
70
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
src/ext/Bal/wixlib/bal.wixproj
-1
@@ -32,6 +32,5 @@
32
33
<ItemGroup>
34
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
35
- <PackageReference Include="GitInfo" PrivateAssets="All" />
35
</ItemGroup>
36
</Project>
src/ext/Bal/wixstdba/wixstdba.vcxproj
-1
@@ -75,7 +75,6 @@ rc.exe -fo "$(OutDir)wixstdba.res" "$(IntDir)wixstdba.messages.rc"</Command>
75
<PackageReference Include="WixToolset.BalUtil" />
76
77
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
78
- <PackageReference Include="GitInfo" PrivateAssets="All" />
78
</ItemGroup>
79
80
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
src/ext/ComPlus/ca/complusca.vcxproj
-1
@@ -93,7 +93,6 @@
93
<ItemGroup>
94
<PackageReference Include="WixToolset.WcaUtil" />
95
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
96
- <PackageReference Include="GitInfo" PrivateAssets="All" />
96
</ItemGroup>
97
98
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
src/ext/ComPlus/wixlib/complus.wixproj
-1
@@ -22,6 +22,5 @@
22
23
<ItemGroup>
24
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
25
- <PackageReference Include="GitInfo" PrivateAssets="All" />
25
</ItemGroup>
26
</Project>
src/ext/Dependency/ca/dependencyca.vcxproj
-1
@@ -63,7 +63,6 @@
63
<ItemGroup>
64
<PackageReference Include="WixToolset.WcaUtil" />
65
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
66
- <PackageReference Include="GitInfo" PrivateAssets="All" />
66
</ItemGroup>
67
68
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
src/ext/Dependency/wixlib/dependency.wixproj
-1
@@ -24,6 +24,5 @@
24
25
<ItemGroup>
26
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
27
- <PackageReference Include="GitInfo" PrivateAssets="All" />
27
</ItemGroup>
28
</Project>
src/ext/DifxApp/wixlib/difxapp.wixproj
-1
@@ -8,6 +8,5 @@
8
9
<ItemGroup>
10
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
11
- <PackageReference Include="GitInfo" PrivateAssets="All" />
11
</ItemGroup>
12
</Project>
src/ext/DirectX/ca/directxca.vcxproj
-1
@@ -57,7 +57,6 @@
57
<ItemGroup>
58
<PackageReference Include="WixToolset.WcaUtil" />
59
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
60
- <PackageReference Include="GitInfo" PrivateAssets="All" />
60
</ItemGroup>
61
62
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
src/ext/DirectX/wixlib/directx.wixproj
-1
@@ -19,6 +19,5 @@
19
20
<ItemGroup>
21
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
22
- <PackageReference Include="GitInfo" PrivateAssets="All" />
22
</ItemGroup>
23
</Project>
src/ext/Firewall/ca/fwca.vcxproj
-1
@@ -67,7 +67,6 @@
67
<ItemGroup>
68
<PackageReference Include="WixToolset.WcaUtil" />
69
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
70
- <PackageReference Include="GitInfo" PrivateAssets="All" />
70
</ItemGroup>
71
72
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
src/ext/Firewall/wixlib/firewall.wixproj
+3
-1
@@ -5,18 +5,20 @@
5
<BindFiles>true</BindFiles>
6
<Cultures>en-us</Cultures>
7
</PropertyGroup>
8
+
9
<ItemGroup>
10
<BindInputPaths Include="$(OutputPath)x86" BindName="x86" />
11
<BindInputPaths Include="$(OutputPath)x64" BindName="x64" />
12
<BindInputPaths Include="$(OutputPath)arm64" BindName="arm64" />
13
</ItemGroup>
14
+
15
<ItemGroup>
16
<ProjectReference Include="..\ca\fwca.vcxproj" Properties="Platform=ARM64" ReferenceOutputAssembly="false" />
17
<ProjectReference Include="..\ca\fwca.vcxproj" Properties="Platform=x86" ReferenceOutputAssembly="false" />
18
<ProjectReference Include="..\ca\fwca.vcxproj" Properties="Platform=x64" ReferenceOutputAssembly="false" />
19
</ItemGroup>
20
+
21
<ItemGroup>
22
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
20
- <PackageReference Include="GitInfo" PrivateAssets="All" />
23
</ItemGroup>
24
</Project>
\ No newline at end of file
src/ext/Http/ca/httpca.vcxproj
-1
@@ -65,7 +65,6 @@
65
<ItemGroup>
66
<PackageReference Include="WixToolset.WcaUtil" />
67
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
68
- <PackageReference Include="GitInfo" PrivateAssets="All" />
68
</ItemGroup>
69
70
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
src/ext/Http/wixlib/http.wixproj
-1
@@ -20,6 +20,5 @@
20
21
<ItemGroup>
22
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
23
- <PackageReference Include="GitInfo" PrivateAssets="All" />
23
</ItemGroup>
24
</Project>
src/ext/Iis/ca/iisca.vcxproj
-1
@@ -139,7 +139,6 @@
139
<ItemGroup>
140
<PackageReference Include="WixToolset.WcaUtil" />
141
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
142
- <PackageReference Include="GitInfo" PrivateAssets="All" />
142
</ItemGroup>
143
144
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
src/ext/Iis/wixlib/iis.wixproj
-1
@@ -21,6 +21,5 @@
21
22
<ItemGroup>
23
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
24
- <PackageReference Include="GitInfo" PrivateAssets="All" />
24
</ItemGroup>
25
</Project>
src/ext/Msmq/ca/msmqca.vcxproj
-1
@@ -63,7 +63,6 @@
63
<ItemGroup>
64
<PackageReference Include="WixToolset.WcaUtil" />
65
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
66
- <PackageReference Include="GitInfo" PrivateAssets="All" />
66
</ItemGroup>
67
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
68
</Project>
\ No newline at end of file
src/ext/Msmq/wixlib/msmq.wixproj
-1
@@ -20,6 +20,5 @@
20
21
<ItemGroup>
22
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
23
- <PackageReference Include="GitInfo" PrivateAssets="All" />
23
</ItemGroup>
24
</Project>
src/ext/NetFx/be/netfxbe.vcxproj
-1
@@ -70,7 +70,6 @@
70
<PackageReference Include="WixToolset.BextUtil" />
71
72
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
73
- <PackageReference Include="GitInfo" PrivateAssets="All" />
73
</ItemGroup>
74
75
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
src/ext/NetFx/ca/netfxca.vcxproj
-1
@@ -64,7 +64,6 @@
64
<ItemGroup>
65
<PackageReference Include="WixToolset.WcaUtil" />
66
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
67
- <PackageReference Include="GitInfo" PrivateAssets="All" />
67
</ItemGroup>
68
69
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
src/ext/NetFx/netcoresearch/netcoresearch.vcxproj
-1
@@ -62,7 +62,6 @@
62
<ItemGroup>
63
<PackageReference Include="WixToolset.Dutil" />
64
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
65
- <PackageReference Include="GitInfo" PrivateAssets="All" />
65
</ItemGroup>
66
67
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
src/ext/NetFx/wixlib/netfx.wixproj
-1
@@ -35,7 +35,6 @@
35
36
<ItemGroup>
37
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
38
- <PackageReference Include="GitInfo" PrivateAssets="All" />
38
<PackageReference Include="Microsoft.NET.Tools.NETCoreCheck.x86" GeneratePathProperty="true" />
39
<PackageReference Include="Microsoft.NET.Tools.NETCoreCheck.x64" GeneratePathProperty="true" />
40
<PackageReference Include="Microsoft.NET.Tools.NETCoreCheck.arm64" GeneratePathProperty="true" />
src/ext/PowerShell/wixlib/powershell.wixproj
-1
@@ -7,6 +7,5 @@
7
8
<ItemGroup>
9
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
10
- <PackageReference Include="GitInfo" PrivateAssets="All" />
10
</ItemGroup>
11
</Project>
src/ext/Sql/ca/sqlca.vcxproj
-1
@@ -74,7 +74,6 @@
74
<ItemGroup>
75
<PackageReference Include="WixToolset.WcaUtil" />
76
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
77
- <PackageReference Include="GitInfo" PrivateAssets="All" />
77
</ItemGroup>
78
79
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
src/ext/Sql/wixlib/sql.wixproj
-1
@@ -20,6 +20,5 @@
20
21
<ItemGroup>
22
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
23
- <PackageReference Include="GitInfo" PrivateAssets="All" />
23
</ItemGroup>
24
</Project>
src/ext/UI/ca/uica.vcxproj
-1
@@ -65,7 +65,6 @@
65
<ItemGroup>
66
<PackageReference Include="WixToolset.WcaUtil" />
67
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
68
- <PackageReference Include="GitInfo" PrivateAssets="All" />
68
</ItemGroup>
69
70
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
src/ext/UI/wixlib/ui.wixproj
-1
@@ -34,6 +34,5 @@
34
35
<ItemGroup>
36
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
37
- <PackageReference Include="GitInfo" PrivateAssets="All" />
37
</ItemGroup>
38
</Project>
src/ext/Util/be/utilbe.vcxproj
-1
@@ -70,7 +70,6 @@
70
<PackageReference Include="WixToolset.BextUtil" />
71
72
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
73
- <PackageReference Include="GitInfo" PrivateAssets="All" />
73
</ItemGroup>
74
75
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
src/ext/Util/ca/utilca.vcxproj
-1
@@ -97,7 +97,6 @@
97
<ItemGroup>
98
<PackageReference Include="WixToolset.WcaUtil" />
99
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
100
- <PackageReference Include="GitInfo" PrivateAssets="All" />
100
</ItemGroup>
101
102
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
src/ext/Util/wixlib/util.wixproj
-1
@@ -22,6 +22,5 @@
22
23
<ItemGroup>
24
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
25
- <PackageReference Include="GitInfo" PrivateAssets="All" />
25
</ItemGroup>
26
</Project>
src/ext/VisualStudio/ca/vsca.vcxproj
-1
@@ -56,7 +56,6 @@
56
<PackageReference Include="Microsoft.VisualStudio.Setup.Configuration.Native" />
57
<PackageReference Include="WixToolset.WcaUtil" />
58
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
59
- <PackageReference Include="GitInfo" PrivateAssets="All" />
59
</ItemGroup>
60
61
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
src/ext/VisualStudio/wixlib/vs.wixproj
-1
@@ -15,6 +15,5 @@
15
16
<ItemGroup>
17
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
18
- <PackageReference Include="GitInfo" PrivateAssets="All" />
18
</ItemGroup>
19
</Project>
src/internal/SetBuildNumber/SetBuildNumber.proj
+32
@@ -10,19 +10,27 @@
10
<!-- Explicitly set the restore sources because this project may run before the build\artifacts folder has been created -->
11
<RestoreSources>https://api.nuget.org/v3/index.json</RestoreSources>
12
<RestoreIgnoreFailedSources>true</RestoreIgnoreFailedSources>
13
+
14
+ <Language>C#</Language>
15
+ <DefaultLanguageSourceExtension>.cs</DefaultLanguageSourceExtension>
16
+ <GitThisAssembly>true</GitThisAssembly>
17
</PropertyGroup>
18
19
<PropertyGroup>
20
<SetBuildNumbersDependsOn>
21
__SetPropertiesFromGit;
22
+ GitThisAssembly;
23
SetAppVeyorBuildNumber;
24
SetGlobalJson;
25
SetDirectoryPackagesProps;
26
+ SetOverallWixVersions;
27
InstallSigningClient
28
</SetBuildNumbersDependsOn>
29
30
<GlobalJsonPath>$([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)..\..\..\global.json))</GlobalJsonPath>
31
<CentralPackageVersionsPath>$([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)..\..\..\Directory.Packages.props))</CentralPackageVersionsPath>
32
+ <OverallWixVersionsPath>$([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)..\..\..\build\wixver.props))</OverallWixVersionsPath>
33
+ <GitInfoThisAssemblyFile>$([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)..\..\..\build\ThisAssembly.WixVer.cs))</GitInfoThisAssemblyFile>
34
</PropertyGroup>
35
36
<Target Name="SetAppVeyorBuildNumber"
@@ -89,6 +97,30 @@
97
</Target>
98
99
100
+ <Target Name="SetOverallWixVersions"
101
+ Inputs="wixver.props.pp"
102
+ Outputs="$(OverallWixVersionsPath)">
103
+ <PropertyGroup>
104
+ <OverallWixVersionsTextHeader><!-- DO NOT MODIFY! Auto-generated from internal\SetBuildNumber\wixver.props.pp --></OverallWixVersionsTextHeader>
105
+ <OverallWixVersionsText>$([System.IO.File]::ReadAllText(wixver.props.pp))</OverallWixVersionsText>
106
+ <OverallWixVersionsText>$(OverallWixVersionsText.Replace('{GitBaseVersionMajor}', $(GitBaseVersionMajor)))</OverallWixVersionsText>
107
+ <OverallWixVersionsText>$(OverallWixVersionsText.Replace('{GitBaseVersionMinor}', $(GitBaseVersionMinor)))</OverallWixVersionsText>
108
+ <OverallWixVersionsText>$(OverallWixVersionsText.Replace('{GitBaseVersionPatch}', $(GitBaseVersionPatch)))</OverallWixVersionsText>
109
+ <OverallWixVersionsText>$(OverallWixVersionsText.Replace('{GitCommits}', $(GitCommits)))</OverallWixVersionsText>
110
+ <OverallWixVersionsText>$(OverallWixVersionsText.Replace('{GitSemVerDashLabel}', $(GitSemVerDashLabel)))</OverallWixVersionsText>
111
+ <OverallWixVersionsText>$(OverallWixVersionsText.Replace('{GitSha}', $(GitSha)))</OverallWixVersionsText>
112
+ <OverallWixVersionsText>$(OverallWixVersionsText.Replace('{GitRepositoryUrl}', $(GitRepositoryUrl.Replace('.git',''))))</OverallWixVersionsText>
113
+ </PropertyGroup>
114
+
115
+ <WriteLinesToFile File="$(OverallWixVersionsPath)"
116
+ Lines="$(OverallWixVersionsTextHeader);$(OverallWixVersionsText)"
117
+ Overwrite="true"
118
+ WriteOnlyWhenDifferent="true" />
119
+
120
+ <Message Importance="high" Text="$(MSBuildProjectName) -> $(OverallWixVersionsPath)" />
121
+ </Target>
122
+
123
+
124
<Target Name="InstallSigningClient"
125
DependsOnTargets="_GetSignClient"
126
Condition=" '$(SigningUser)'!='' ">
src/internal/SetBuildNumber/wixver.props.pp
new
+13
@@ -0,0 +1,13 @@
1
+<Project>
2
+ <PropertyGroup>
3
+ <GitInfoFromCache>true</GitInfoFromCache>
4
+ <GitInfoImported>true</GitInfoImported>
5
+ <GitBaseVersionMajor>{GitBaseVersionMajor}</GitBaseVersionMajor>
6
+ <GitBaseVersionMinor>{GitBaseVersionMinor}</GitBaseVersionMinor>
7
+ <GitBaseVersionPatch>{GitBaseVersionPatch}</GitBaseVersionPatch>
8
+ <GitCommits>{GitCommits}</GitCommits>
9
+ <GitSemVerDashLabel>{GitSemVerDashLabel}</GitSemVerDashLabel>
10
+ <GitSha>{GitSha}</GitSha>
11
+ <GitRepositoryUrl>{GitRepositoryUrl}</GitRepositoryUrl>
12
+ </PropertyGroup>
13
+</Project>
src/internal/WixBuildFinalize/WixBuildFinalize.proj
-4
@@ -6,10 +6,6 @@
6
<TargetFramework>net472</TargetFramework>
7
</PropertyGroup>
8
9
- <ItemGroup>
10
- <PackageReference Include="GitInfo" PrivateAssets="All" />
11
- </ItemGroup>
12
-
9
<Target Name="ZipPdbs" DependsOnTargets="__SetPropertiesFromGit" BeforeTargets="AfterBuild">
10
<ZipDirectory
11
SourceDirectory="$(PdbsFolder)"
src/internal/WixBuildTools.MsgGen/WixBuildTools.MsgGen.csproj
-5
@@ -20,9 +20,4 @@
20
<EmbeddedResource Include="Xsd\messages.xsd" />
21
</ItemGroup>
22
23
- <ItemGroup>
24
- <PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
25
- <PackageReference Include="GitInfo" PrivateAssets="All" />
26
- </ItemGroup>
27
-
23
</Project>
src/internal/WixBuildTools.XsdGen/WixBuildTools.XsdGen.csproj
-1
@@ -23,6 +23,5 @@
23
24
<ItemGroup>
25
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
26
- <PackageReference Include="GitInfo" PrivateAssets="All" />
26
</ItemGroup>
27
</Project>
src/internal/WixInternal.TestSupport.Native/build/WixInternal.TestSupport.Native.targets
-2
@@ -32,13 +32,11 @@
32
</Reference>
33
</ItemGroup>
34
35
- <Import Project="$(RootPackagesFolder)GitInfo.2.2.0\build\GitInfo.targets" Condition="Exists('$(RootPackagesFolder)GitInfo.2.2.0\build\GitInfo.targets')" />
35
<Import Project="$(RootPackagesFolder)xunit.core.2.4.2\build\xunit.core.targets" Condition="Exists('$(RootPackagesFolder)xunit.core.2.4.2\build\xunit.core.targets')" />
36
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
37
<PropertyGroup>
38
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
39
</PropertyGroup>
41
- <Error Condition="!Exists('$(RootPackagesFolder)GitInfo.2.2.0\build\GitInfo.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(RootPackagesFolder)GitInfo.2.2.0\build\GitInfo.targets'))" />
40
<Error Condition="!Exists('$(RootPackagesFolder)xunit.core.2.4.2\build\xunit.core.props')" Text="$([System.String]::Format('$(ErrorText)', '$(RootPackagesFolder)xunit.core.2.4.2\build\xunit.core.props'))" />
41
<Error Condition="!Exists('$(RootPackagesFolder)xunit.core.2.4.2\build\xunit.core.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(RootPackagesFolder)xunit.core.2.4.2\build\xunit.core.targets'))" />
42
<Error Condition="!Exists('$(RootPackagesFolder)xunit.runner.visualstudio.2.4.5\build\net462\xunit.runner.visualstudio.props')" Text="$([System.String]::Format('$(ErrorText)', '$(RootPackagesFolder)xunit.runner.visualstudio.2.4.5\build\net462\xunit.runner.visualstudio.props'))" />
src/internal/WixInternal.TestSupport.Native/packages.config
-1
@@ -6,7 +6,6 @@
6
Update build\WixInternal.TestSupport.Native.props and build\WixInternal.TestSupport.Native.targets
7
when any of these versions are updated.
8
-->
9
- <package id="GitInfo" version="2.2.0" />
9
<package id="xunit.abstractions" version="2.0.3" />
10
<package id="xunit.assert" version="2.4.2" />
11
<package id="xunit.core" version="2.4.2" />
src/libs/dutil/WixToolset.DUtil/dutil.vcxproj
-1
@@ -185,7 +185,6 @@
185
186
<ItemGroup>
187
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
188
- <PackageReference Include="GitInfo" PrivateAssets="All" />
188
</ItemGroup>
189
190
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
src/libs/wcautil/WixToolset.WcaUtil/wcautil.vcxproj
-1
@@ -79,7 +79,6 @@
79
80
<ItemGroup>
81
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
82
- <PackageReference Include="GitInfo" PrivateAssets="All" />
82
</ItemGroup>
83
84
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
src/setup/ThmViewerPackage/ThmViewerPackage.wixproj
-5
@@ -3,9 +3,4 @@
3
<ItemGroup>
4
<LinkerBindInputPaths Include="$(RootBuildFolder)tools\$(Configuration)\x86" />
5
</ItemGroup>
6
-
7
- <ItemGroup>
8
- <PackageReference Include="GitInfo" PrivateAssets="All" />
9
- </ItemGroup>
10
-
6
</Project>
src/setup/WixAdditionalTools/WixAdditionalTools.wixproj
-1
@@ -11,7 +11,6 @@
11
12
<ItemGroup>
13
<PackageReference Include="WixToolset.Bal.wixext" />
14
- <PackageReference Include="GitInfo" PrivateAssets="All" />
14
</ItemGroup>
15
16
<UsingTask TaskName="GenerateMetadata" AssemblyFile="$(BaseOutputPath)$(Configuration)\net472\MetadataTask.dll" />
src/tools/thmviewer/thmviewer.vcxproj
-1
@@ -62,7 +62,6 @@
62
<PackageReference Include="WixToolset.DUtil" />
63
64
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
65
- <PackageReference Include="GitInfo" PrivateAssets="All" />
65
</ItemGroup>
66
67
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
src/wix/WixToolset.Core.Burn/WixToolset.Core.Burn.csproj
+1
-2
@@ -10,8 +10,7 @@
10
<DebugType>embedded</DebugType>
11
<PublishRepositoryUrl>true</PublishRepositoryUrl>
12
<CreateDocumentationFile>true</CreateDocumentationFile>
13
-
14
- <GitThisAssembly>true</GitThisAssembly>
13
+ <IncludeThisAssembly>true</IncludeThisAssembly>
14
</PropertyGroup>
15
16
<ItemGroup>
src/wix/WixToolset.Core/WixToolset.Core.csproj
+1
-2
@@ -10,8 +10,7 @@
10
<DebugType>embedded</DebugType>
11
<PublishRepositoryUrl>true</PublishRepositoryUrl>
12
<CreateDocumentationFile>true</CreateDocumentationFile>
13
-
14
- <GitThisAssembly>true</GitThisAssembly>
13
+ <IncludeThisAssembly>true</IncludeThisAssembly>
14
</PropertyGroup>
15
16
<ItemGroup>
src/wix/wix.cmd
+2
-2
@@ -28,9 +28,9 @@ msbuild wixnative\wixnative_t.proj -p:Configuration=%_C% -nologo -m -warnaserror
28
29
msbuild wix.sln -p:Configuration=%_C% -nologo -m -warnaserror -bl:%_L%\wix_build.binlog || exit /b
30
31
-msbuild publish_t.proj -p:Configuration=%_C% -nologo -warnaserror -bl:%_L%\wix_publish.binlog || exit /b
31
+msbuild publish_t.proj -p:Configuration=%_C% -nologo -m -warnaserror -bl:%_L%\wix_publish.binlog || exit /b
32
33
-msbuild -t:Publish -p:Configuration=%_C% -nologo -warnaserror WixToolset.Sdk\WixToolset.Sdk.csproj -bl:%_L%\wix_sdk_publish.binlog || exit /b
33
+msbuild -t:Publish -p:Configuration=%_C% -nologo -m -warnaserror WixToolset.Sdk\WixToolset.Sdk.csproj -bl:%_L%\wix_sdk_publish.binlog || exit /b
34
35
:: TODO - used by MsbuildFixture.ReportsInnerExceptionForUnexpectedExceptions test
36
:: msbuild -t:Publish -Restore -p:Configuration=%_C% -p:TargetFramework=net472 -p:RuntimeIdentifier=linux-x86 -p:PublishDir=%_P%WixToolset.Sdk\broken\net472\ wix\wix.csproj || exit /b
src/wix/wixnative/wixnative.vcxproj
-1
@@ -63,7 +63,6 @@
63
<ItemGroup>
64
<PackageReference Include="WixToolset.Dutil" />
65
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
66
- <PackageReference Include="GitInfo" PrivateAssets="All" />
66
</ItemGroup>
67
68
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />