Skip to content

Commit ee5313e

Browse files
committed
Build installers at the end of the repo build
Build the Installer projects after everythign else got built by adding a new Traversal project that builds all P2Ps in it in parallel. Fixes #58984 Unblocks dotnet/sdk#44828
1 parent 5493b41 commit ee5313e

File tree

3 files changed

+77
-69
lines changed

3 files changed

+77
-69
lines changed

eng/Build.props

+3-68
Original file line numberDiff line numberDiff line change
@@ -71,74 +71,6 @@
7171
</ItemGroup>
7272
</When>
7373
<Otherwise>
74-
<PropertyGroup>
75-
<_BuildWindowsInstallers Condition="'$(BuildInstallers)' == 'true' AND '$(TargetOsName)' == 'win' AND ('$(TargetArchitecture)' == 'x86' OR '$(TargetArchitecture)' == 'x64' OR '$(TargetArchitecture)' == 'arm64') ">true</_BuildWindowsInstallers>
76-
<_WixTargetPlatform Condition="'$(TargetArchitecture)' == 'x86' ">Win32</_WixTargetPlatform>
77-
<_WixTargetPlatform Condition="'$(TargetArchitecture)' == 'x64' ">x64</_WixTargetPlatform>
78-
<_WixTargetPlatform Condition="'$(TargetArchitecture)' == 'arm64' ">ARM64</_WixTargetPlatform>
79-
</PropertyGroup>
80-
<ItemGroup Condition="'$(DotNetBuild)' != 'true' and '$(_BuildWindowsInstallers)' == 'true' ">
81-
<!-- Build the ANCM custom action -->
82-
<ProjectToBuild Include="$(RepoRoot)src\Installers\Windows\AspNetCoreModule-Setup\CustomAction\aspnetcoreCA.vcxproj" AdditionalProperties="Platform=x64" />
83-
<ProjectToBuild Include="$(RepoRoot)src\Installers\Windows\AspNetCoreModule-Setup\CustomAction\aspnetcoreCA.vcxproj" AdditionalProperties="Platform=Win32" />
84-
<ProjectToBuild Include="$(RepoRoot)src\Installers\Windows\AspNetCoreModule-Setup\CustomAction\aspnetcoreCA.vcxproj" AdditionalProperties="Platform=ARM64" />
85-
86-
<!-- Build the ANCM msis -->
87-
<ProjectToBuild Include="$(RepoRoot)src\Installers\Windows\AspNetCoreModule-Setup\ANCMIISExpressV2\AncmIISExpressV2.wixproj" AdditionalProperties="Platform=x64" />
88-
<ProjectToBuild Include="$(RepoRoot)src\Installers\Windows\AspNetCoreModule-Setup\ANCMIISExpressV2\AncmIISExpressV2.wixproj" AdditionalProperties="Platform=x86" />
89-
<ProjectToBuild Include="$(RepoRoot)src\Installers\Windows\AspNetCoreModule-Setup\ANCMIISExpressV2\AncmIISExpressV2.wixproj" AdditionalProperties="Platform=arm64" />
90-
<ProjectToBuild Include="$(RepoRoot)src\Installers\Windows\AspNetCoreModule-Setup\ANCMV2\ANCMV2.wixproj" AdditionalProperties="Platform=x64" />
91-
<ProjectToBuild Include="$(RepoRoot)src\Installers\Windows\AspNetCoreModule-Setup\ANCMV2\ANCMV2.wixproj" AdditionalProperties="Platform=x86" />
92-
<ProjectToBuild Include="$(RepoRoot)src\Installers\Windows\AspNetCoreModule-Setup\ANCMV2\ANCMV2.wixproj" AdditionalProperties="Platform=arm64" />
93-
94-
<!-- Build the targeting pack installers -->
95-
<ProjectToBuild Include="$(RepoRoot)src\Installers\Windows\TargetingPack\TargetingPack.wixproj" AdditionalProperties="Platform=x64" />
96-
<ProjectToBuild Include="$(RepoRoot)src\Installers\Windows\TargetingPack\TargetingPack.wixproj" AdditionalProperties="Platform=x86" />
97-
<!-- This really shouldn't be here, but instead of harvesting from the intermediate/output directories, the targeting pack installer logic
98-
harvests from a zip of the reference assemblies. Producing it in each leg ends up with multiple targeting packs
99-
getting produced and the BAR will reject the build. Centralize building the targeting pack in the x86/x64 leg. -->
100-
<ProjectToBuild Include="$(RepoRoot)src\Installers\Windows\TargetingPack\TargetingPack.wixproj" AdditionalProperties="Platform=arm64" />
101-
102-
<!-- Build the SharedFramework installers -->
103-
<ProjectToBuild Include="$(RepoRoot)src\Installers\Windows\SharedFrameworkBundle\SharedFrameworkBundle.wixproj" AdditionalProperties="Platform=x64" />
104-
<ProjectToBuild Include="$(RepoRoot)src\Installers\Windows\SharedFrameworkBundle\SharedFrameworkBundle.wixproj" AdditionalProperties="Platform=x86" />
105-
<ProjectToBuild Include="$(RepoRoot)src\Installers\Windows\SharedFrameworkBundle\SharedFrameworkBundle.wixproj" AdditionalProperties="Platform=arm64" />
106-
107-
<!-- Build the SharedFramework wixlib -->
108-
<ProjectToBuild Include="$(RepoRoot)src\Installers\Windows\SharedFrameworkLib\SharedFrameworkLib.wixproj" AdditionalProperties="Platform=x64" />
109-
<ProjectToBuild Include="$(RepoRoot)src\Installers\Windows\SharedFrameworkLib\SharedFrameworkLib.wixproj" AdditionalProperties="Platform=x86" />
110-
<ProjectToBuild Include="$(RepoRoot)src\Installers\Windows\SharedFrameworkLib\SharedFrameworkLib.wixproj" AdditionalProperties="Platform=arm64" />
111-
112-
<!-- Windows hosting bundle -->
113-
<ProjectToBuild Include="$(RepoRoot)src\Installers\Windows\WindowsHostingBundle\WindowsHostingBundle.wixproj" AdditionalProperties="Platform=x86" />
114-
</ItemGroup>
115-
116-
<!-- In a vertical build, only build the MSIs for the current vertical in the first pass and build the hosting bundle in the second pass -->
117-
<ItemGroup Condition="'$(DotNetBuild)' == 'true' and ('$(DotNetBuildPass)' == '' or '$(DotNetBuildPass)' == '1') and '$(_BuildWindowsInstallers)' == 'true'">
118-
<!-- Build the ANCM custom action -->
119-
<ProjectToBuild Include="$(RepoRoot)src\Installers\Windows\AspNetCoreModule-Setup\CustomAction\aspnetcoreCA.vcxproj" AdditionalProperties="Platform=$(_WixTargetPlatform)" />
120-
<!-- Build the ANCM msis -->
121-
<ProjectToBuild Include="$(RepoRoot)src\Installers\Windows\AspNetCoreModule-Setup\ANCMIISExpressV2\AncmIISExpressV2.wixproj" AdditionalProperties="Platform=$(_WixTargetPlatform)" />
122-
<ProjectToBuild Include="$(RepoRoot)src\Installers\Windows\AspNetCoreModule-Setup\ANCMV2\ANCMV2.wixproj" AdditionalProperties="Platform=$(_WixTargetPlatform)" />
123-
<!-- Build the targeting pack installers -->
124-
<ProjectToBuild Include="$(RepoRoot)src\Installers\Windows\TargetingPack\TargetingPack.wixproj" AdditionalProperties="Platform=$(_WixTargetPlatform)" />
125-
<!-- Build the SharedFramework installers -->
126-
<ProjectToBuild Include="$(RepoRoot)src\Installers\Windows\SharedFrameworkBundle\SharedFrameworkBundle.wixproj" AdditionalProperties="Platform=$(_WixTargetPlatform)" />
127-
<!-- Build the SharedFramework wixlib -->
128-
<ProjectToBuild Include="$(RepoRoot)src\Installers\Windows\SharedFrameworkLib\SharedFrameworkLib.wixproj" AdditionalProperties="Platform=$(_WixTargetPlatform)" />
129-
</ItemGroup>
130-
131-
<ItemGroup Condition="'$(DotNetBuild)' == 'true' and ('$(DotNetBuildPass)' == '2') and '$(BuildInstallers)' == 'true' AND '$(TargetOsName)' == 'win' and '$(TargetArchitecture)' == 'x64'">
132-
<ProjectToBuild Include="$(RepoRoot)src\Installers\Windows\WindowsHostingBundle\WindowsHostingBundle.wixproj" AdditionalProperties="Platform=x86" />
133-
</ItemGroup>
134-
135-
<ItemGroup Condition="'$(BuildInstallers)' == 'true' AND ('$(TargetRuntimeIdentifier)' == 'linux-x64' OR '$(TargetRuntimeIdentifier)' == 'linux-arm64')">
136-
<ProjectToBuild Condition=" '$(LinuxInstallerType)' == 'deb' "
137-
Include="$(RepoRoot)src\Installers\Debian\**\*.*proj" />
138-
<ProjectToBuild Condition=" '$(LinuxInstallerType)' == 'rpm' "
139-
Include="$(RepoRoot)src\Installers\Rpm\**\*.*proj" />
140-
</ItemGroup>
141-
14274
<ItemGroup Condition=" '$(TargetOsName)' == 'win' AND ('$(TargetArchitecture)' == 'x86' OR '$(TargetArchitecture)' == 'x64' OR '$(TargetArchitecture)' == 'arm64') ">
14375
<NativeProjects Include="$(RepoRoot)src\**\*.vcxproj" Exclude="@(ProjectToExclude)" AdditionalProperties="Platform=x64" />
14476
<NativeProjects Include="$(RepoRoot)src\**\*.vcxproj" Exclude="@(ProjectToExclude)" AdditionalProperties="Platform=Win32" />
@@ -271,6 +203,9 @@
271203

272204
<ProjectToBuild Condition=" '$(BuildManaged)' == 'true'" Include="@(DotNetProjects)" Exclude="@(ProjectToExclude)" />
273205
<ProjectToExclude Condition=" '$(BuildManaged)' != 'true'" Include="@(DotNetProjects)" />
206+
207+
<!-- Build installers after everything else got built. -->
208+
<ProjecttoBuild Condition="'$(BuildInstallers)' == 'true'" Include="$(MSBuildThisFileDirectory)Installers.proj" BuildInParallel="false" />
274209
</ItemGroup>
275210
</Otherwise>
276211
</Choose>

eng/Installers.proj

+72
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
<Project Sdk="Microsoft.Build.Traversal">
2+
3+
<PropertyGroup>
4+
<_BuildWindowsInstallers Condition="'$(TargetOsName)' == 'win' and ('$(TargetArchitecture)' == 'x86' or '$(TargetArchitecture)' == 'x64' or '$(TargetArchitecture)' == 'arm64')">true</_BuildWindowsInstallers>
5+
<_WixTargetPlatform Condition="'$(TargetArchitecture)' == 'x86' ">Win32</_WixTargetPlatform>
6+
<_WixTargetPlatform Condition="'$(TargetArchitecture)' == 'x64' ">x64</_WixTargetPlatform>
7+
<_WixTargetPlatform Condition="'$(TargetArchitecture)' == 'arm64' ">ARM64</_WixTargetPlatform>
8+
</PropertyGroup>
9+
10+
<ItemGroup Condition="'$(DotNetBuild)' != 'true' and '$(_BuildWindowsInstallers)' == 'true'">
11+
<!-- Build the ANCM custom action -->
12+
<ProjectReference Include="$(RepoRoot)src\Installers\Windows\AspNetCoreModule-Setup\CustomAction\aspnetcoreCA.vcxproj" AdditionalProperties="Platform=x64" />
13+
<ProjectReference Include="$(RepoRoot)src\Installers\Windows\AspNetCoreModule-Setup\CustomAction\aspnetcoreCA.vcxproj" AdditionalProperties="Platform=Win32" />
14+
<ProjectReference Include="$(RepoRoot)src\Installers\Windows\AspNetCoreModule-Setup\CustomAction\aspnetcoreCA.vcxproj" AdditionalProperties="Platform=ARM64" />
15+
16+
<!-- Build the ANCM msis -->
17+
<ProjectReference Include="$(RepoRoot)src\Installers\Windows\AspNetCoreModule-Setup\ANCMIISExpressV2\AncmIISExpressV2.wixproj" AdditionalProperties="Platform=x64" />
18+
<ProjectReference Include="$(RepoRoot)src\Installers\Windows\AspNetCoreModule-Setup\ANCMIISExpressV2\AncmIISExpressV2.wixproj" AdditionalProperties="Platform=x86" />
19+
<ProjectReference Include="$(RepoRoot)src\Installers\Windows\AspNetCoreModule-Setup\ANCMIISExpressV2\AncmIISExpressV2.wixproj" AdditionalProperties="Platform=arm64" />
20+
<ProjectReference Include="$(RepoRoot)src\Installers\Windows\AspNetCoreModule-Setup\ANCMV2\ANCMV2.wixproj" AdditionalProperties="Platform=x64" />
21+
<ProjectReference Include="$(RepoRoot)src\Installers\Windows\AspNetCoreModule-Setup\ANCMV2\ANCMV2.wixproj" AdditionalProperties="Platform=x86" />
22+
<ProjectReference Include="$(RepoRoot)src\Installers\Windows\AspNetCoreModule-Setup\ANCMV2\ANCMV2.wixproj" AdditionalProperties="Platform=arm64" />
23+
24+
<!-- Build the targeting pack installers -->
25+
<ProjectReference Include="$(RepoRoot)src\Installers\Windows\TargetingPack\TargetingPack.wixproj" AdditionalProperties="Platform=x64" />
26+
<ProjectReference Include="$(RepoRoot)src\Installers\Windows\TargetingPack\TargetingPack.wixproj" AdditionalProperties="Platform=x86" />
27+
<!-- This really shouldn't be here, but instead of harvesting from the intermediate/output directories, the targeting pack installer logic
28+
harvests from a zip of the reference assemblies. Producing it in each leg ends up with multiple targeting packs
29+
getting produced and the BAR will reject the build. Centralize building the targeting pack in the x86/x64 leg. -->
30+
<ProjectReference Include="$(RepoRoot)src\Installers\Windows\TargetingPack\TargetingPack.wixproj" AdditionalProperties="Platform=arm64" />
31+
32+
<!-- Build the SharedFramework installers -->
33+
<ProjectReference Include="$(RepoRoot)src\Installers\Windows\SharedFrameworkBundle\SharedFrameworkBundle.wixproj" AdditionalProperties="Platform=x64" />
34+
<ProjectReference Include="$(RepoRoot)src\Installers\Windows\SharedFrameworkBundle\SharedFrameworkBundle.wixproj" AdditionalProperties="Platform=x86" />
35+
<ProjectReference Include="$(RepoRoot)src\Installers\Windows\SharedFrameworkBundle\SharedFrameworkBundle.wixproj" AdditionalProperties="Platform=arm64" />
36+
37+
<!-- Build the SharedFramework wixlib -->
38+
<ProjectReference Include="$(RepoRoot)src\Installers\Windows\SharedFrameworkLib\SharedFrameworkLib.wixproj" AdditionalProperties="Platform=x64" />
39+
<ProjectReference Include="$(RepoRoot)src\Installers\Windows\SharedFrameworkLib\SharedFrameworkLib.wixproj" AdditionalProperties="Platform=x86" />
40+
<ProjectReference Include="$(RepoRoot)src\Installers\Windows\SharedFrameworkLib\SharedFrameworkLib.wixproj" AdditionalProperties="Platform=arm64" />
41+
42+
<!-- Windows hosting bundle -->
43+
<ProjectReference Include="$(RepoRoot)src\Installers\Windows\WindowsHostingBundle\WindowsHostingBundle.wixproj" AdditionalProperties="Platform=x86" />
44+
</ItemGroup>
45+
46+
<!-- In a vertical build, only build the MSIs for the current vertical in the first pass and build the hosting bundle in the second pass -->
47+
<ItemGroup Condition="'$(DotNetBuild)' == 'true' and ('$(DotNetBuildPass)' == '' or '$(DotNetBuildPass)' == '1') and '$(_BuildWindowsInstallers)' == 'true'">
48+
<!-- Build the ANCM custom action -->
49+
<ProjectReference Include="$(RepoRoot)src\Installers\Windows\AspNetCoreModule-Setup\CustomAction\aspnetcoreCA.vcxproj" AdditionalProperties="Platform=$(_WixTargetPlatform)" />
50+
<!-- Build the ANCM msis -->
51+
<ProjectReference Include="$(RepoRoot)src\Installers\Windows\AspNetCoreModule-Setup\ANCMIISExpressV2\AncmIISExpressV2.wixproj" AdditionalProperties="Platform=$(_WixTargetPlatform)" />
52+
<ProjectReference Include="$(RepoRoot)src\Installers\Windows\AspNetCoreModule-Setup\ANCMV2\ANCMV2.wixproj" AdditionalProperties="Platform=$(_WixTargetPlatform)" />
53+
<!-- Build the targeting pack installers -->
54+
<ProjectReference Include="$(RepoRoot)src\Installers\Windows\TargetingPack\TargetingPack.wixproj" AdditionalProperties="Platform=$(_WixTargetPlatform)" />
55+
<!-- Build the SharedFramework installers -->
56+
<ProjectReference Include="$(RepoRoot)src\Installers\Windows\SharedFrameworkBundle\SharedFrameworkBundle.wixproj" AdditionalProperties="Platform=$(_WixTargetPlatform)" />
57+
<!-- Build the SharedFramework wixlib -->
58+
<ProjectReference Include="$(RepoRoot)src\Installers\Windows\SharedFrameworkLib\SharedFrameworkLib.wixproj" AdditionalProperties="Platform=$(_WixTargetPlatform)" />
59+
</ItemGroup>
60+
61+
<ItemGroup Condition="'$(DotNetBuild)' == 'true' and ('$(DotNetBuildPass)' == '2') and '$(TargetOsName)' == 'win' and '$(TargetArchitecture)' == 'x64'">
62+
<ProjectReference Include="$(RepoRoot)src\Installers\Windows\WindowsHostingBundle\WindowsHostingBundle.wixproj" AdditionalProperties="Platform=x86" />
63+
</ItemGroup>
64+
65+
<ItemGroup Condition="'$(TargetRuntimeIdentifier)' == 'linux-x64' or '$(TargetRuntimeIdentifier)' == 'linux-arm64'">
66+
<ProjectReference Condition=" '$(LinuxInstallerType)' == 'deb' "
67+
Include="$(RepoRoot)src\Installers\Debian\**\*.*proj" />
68+
<ProjectReference Condition=" '$(LinuxInstallerType)' == 'rpm' "
69+
Include="$(RepoRoot)src\Installers\Rpm\**\*.*proj" />
70+
</ItemGroup>
71+
72+
</Project>

global.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
},
2929
"msbuild-sdks": {
3030
"Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.24564.1",
31-
"Microsoft.DotNet.Helix.Sdk": "10.0.0-beta.24564.1"
31+
"Microsoft.DotNet.Helix.Sdk": "10.0.0-beta.24564.1",
32+
"Microsoft.Build.Traversal": "3.4.0"
3233
}
3334
}

0 commit comments

Comments
 (0)