Skip to content

Commit 3a1fc4f

Browse files
authored
Re-enable WOW64, arm64 forwarders in Hosting Bundle (#61026)
* Re-enable WOW64, arm64 forwarders in Hosting Bundle * Only build x86 early * Fixup * Build via ProjectRefs * Build order * Fix build
1 parent 19f7118 commit 3a1fc4f

File tree

5 files changed

+78
-13
lines changed

5 files changed

+78
-13
lines changed

eng/Build.props

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,7 @@
264264
<_VcxTargetPlatform Condition="'$(TargetArchitecture)' == 'arm64'">ARM64</_VcxTargetPlatform>
265265
</PropertyGroup>
266266

267+
<!-- In the VMR, we build the installers entirely via HostingBundle ProjectReferences in pass 2 -->
267268
<ItemGroup Condition="'$(DotNetBuild)' != 'true' and '$(_BuildWindowsInstallers)' == 'true' ">
268269
<!-- Build the ANCM custom action -->
269270
<InstallerProject Include="$(RepoRoot)src\Installers\Windows\AspNetCoreModule-Setup\CustomAction\aspnetcoreCA.vcxproj" AdditionalProperties="Platform=x64" />
@@ -282,14 +283,6 @@
282283
<InstallerProject Include="$(RepoRoot)src\Installers\Windows\WindowsHostingBundle\WindowsHostingBundle.wixproj" AdditionalProperties="Platform=x86" />
283284
</ItemGroup>
284285

285-
<!--
286-
In a vertical build, only build the MSIs for the current vertical that aren't used in the hosting bundle in the first pass
287-
and build the hosting bundle and its dependencies in the second pass.
288-
-->
289-
<ItemGroup Condition="'$(DotNetBuild)' == 'true' and ('$(DotNetBuildPass)' == '' or '$(DotNetBuildPass)' == '1') and '$(_BuildWindowsInstallers)' == 'true'">
290-
<InstallerProject Include="$(RepoRoot)src\Installers\Windows\AspNetCoreModule-Setup\ANCMIISExpressV2\AncmIISExpressV2.wixproj" AdditionalProperties="Platform=$(TargetArchitecture)" />
291-
</ItemGroup>
292-
293286
<ItemGroup>
294287
<ProjectToBuild Condition=" '$(BuildInstallers)' == 'true'" Include="@(InstallerProject)" BuildStep="installer" />
295288
</ItemGroup>

src/Installers/Windows/AspNetCoreModule-Setup/ANCMIISExpressV2/AncmIISExpressV2.wixproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@
9595
'$(PackageLicenseExpression)' " />
9696
</Target>
9797

98-
<Target Name="BeforeBuild" Condition="'$(Platform)' == 'arm64' AND '$(DotNetBuild)' != 'true'">
98+
<Target Name="BeforeBuild" Condition="'$(Platform)' == 'arm64'" >
9999
<MSBuild Projects="..\Forwarders\build.proj" />
100100
</Target>
101101
</Project>

src/Installers/Windows/AspNetCoreModule-Setup/ANCMIISExpressV2/ancm_iis_expressv2.wxs

Lines changed: 52 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,52 @@
265265
</Component>
266266
</Directory>
267267
</Directory>
268+
269+
<!-- WOW64 Support -->
270+
<?if $(var.Platform) != "x86" ?>
271+
<Directory Id="$(var.ProgramFilesFolder32)">
272+
<Directory Id="INSTALLDIR32" Name="IIS Express" >
273+
<Directory Id="INSTALLLOCATION32" ShortName="ANCM" Name="$(var.ProductName)">
274+
<Directory Id="VersionDir32" Name="$(var.ProductVersionString)">
275+
<!-- Originally created with same component GUID as IIS installer. Must remain the same so upgrade doesn't remove this file -->
276+
<Component Id="AspNetCoreModule.wow" Guid="45ba5011-a619-4d06-8a8d-155b1f9732b3" Win64="no">
277+
<File Id="AspNetCoreModuleDll.wow"
278+
Name="aspnetcorev2.dll"
279+
Source="$(var.ArtifactsDir)\bin\AspNetCoreModuleShim\Win32\$(var.Configuration)\aspnetcorev2.dll"
280+
DiskId="1"
281+
Vital="yes">
282+
</File>
283+
<RegistryKey Root="HKLM" Key="SYSTEM\CurrentControlSet\Services\EventLog\Application\$(var.ProductShortName)">
284+
<RegistryValue Name="EventMessageFile" Type="expandable" Value="[#AspNetCoreModuleDll.wow]"/>
285+
<RegistryValue Name="TypesSupported" Type="integer" Value="7"/>
286+
</RegistryKey>
287+
</Component>
288+
<Directory Id="HandlerVersionDir32" Name="$(var.ANCMFolderVersion)" >
289+
<Component Id="AspNetCoreModuleHandler.wow" Guid="0A8EDB50-7D85-4825-8010-D27EFAF061B6" Win64="no">
290+
<File Id="AspNetCoreModuleHandlerDll.wow"
291+
Name="aspnetcorev2_outofprocess.dll"
292+
Source="$(var.ArtifactsDir)\bin\OutOfProcessRequestHandler\Win32\$(var.Configuration)\aspnetcorev2_outofprocess.dll"
293+
DiskId="1"
294+
Vital="yes">
295+
</File>
296+
</Component>
297+
</Directory>
298+
</Directory>
299+
</Directory>
300+
<Directory Id="IISConfigDir.wow" Name="config">
301+
<Directory Id="IISSchemaDir.wow" Name="schema">
302+
<Component Id="AspNetCoreSchema.wow" Guid="$(var.SchemaGuid32)" Win64="no" >
303+
<File Id="AspNetCoreSchemaFile.wow"
304+
Name="aspnetcore_schema_v2.xml"
305+
Source="$(var.AspNetCoreSchemaPath)"
306+
DiskId="1"
307+
Vital="yes"/>
308+
</Component>
309+
</Directory>
310+
</Directory>
311+
</Directory>
312+
</Directory>
313+
<?endif?>
268314
</DirectoryRef>
269315

270316
<!-- Feature Definition -->
@@ -278,6 +324,11 @@
278324
<ComponentRef Id="AspNetCoreModuleHandler.arm64" />
279325
<?endif ?>
280326
<ComponentRef Id="AspNetCoreSchema"/>
327+
<?if $(var.Platform) != "x86" ?>
328+
<ComponentRef Id="AspNetCoreModule.wow"/>
329+
<ComponentRef Id="AspNetCoreModuleHandler.wow"/>
330+
<ComponentRef Id="AspNetCoreSchema.wow"/>
331+
<?endif ?>
281332
</Feature>
282333

283334
<!-- User Interface -->
@@ -637,4 +688,4 @@
637688
<Binary Id="IISCustomActionDll" SourceFile="$(var.aspnetcoreCA.TargetPath)"/>
638689
</Fragment>
639690

640-
</Wix>
691+
</Wix>

src/Installers/Windows/WindowsHostingBundle/WindowsHostingBundle.wixproj

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,27 @@
7171
</ProjectReference>
7272
</ItemGroup>
7373

74+
<ItemGroup Condition="'$(DotNetBuild)' == 'true'" >
75+
<ProjectReference Include="..\AspNetCoreModule-Setup\ANCMIISExpressV2\AncmIISExpressV2.wixproj">
76+
<SetPlatform>Platform=x86</SetPlatform>
77+
<Name>AspNetCoreModuleV2IISExpress_x86</Name>
78+
<Private>True</Private>
79+
<DoNotHarvest>true</DoNotHarvest>
80+
</ProjectReference>
81+
<ProjectReference Include="..\AspNetCoreModule-Setup\ANCMIISExpressV2\AncmIISExpressV2.wixproj">
82+
<SetPlatform>Platform=x64</SetPlatform>
83+
<Name>AspNetCoreModuleV2IISExpress_x64</Name>
84+
<Private>True</Private>
85+
<DoNotHarvest>true</DoNotHarvest>
86+
</ProjectReference>
87+
<ProjectReference Include="..\AspNetCoreModule-Setup\ANCMIISExpressV2\AncmIISExpressV2.wixproj">
88+
<SetPlatform>Platform=arm64</SetPlatform>
89+
<Name>AspNetCoreModuleV2IISExpress_arm64</Name>
90+
<Private>True</Private>
91+
<DoNotHarvest>true</DoNotHarvest>
92+
</ProjectReference>
93+
</ItemGroup>
94+
7495
<Import Project="Product.targets" />
7596

7697
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Directory.Build.targets))\Directory.Build.targets" />

src/Servers/IIS/Directory.Build.props

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,20 @@
88
<HostArch>$(Platform)</HostArch>
99
<HostArch Condition="'$(Platform)' == 'Win32'">x86</HostArch>
1010
<HostArch Condition="'$(Platform)' == 'AnyCPU'">x64</HostArch>
11-
<HostArch Condition="'$(DotNetBuild)' == 'true'">$(TargetArchitecture)</HostArch>
11+
<HostArch Condition="'$(DotNetBuild)' == 'true' AND '$(DotNetBuildPass)' != '2'">$(TargetArchitecture)</HostArch>
1212
<LibNetHostPath>$(NuGetPackageRoot)microsoft.netcore.app.host.win-$(HostArch)\$(LibNetHostAppPackVersion)\runtimes\win-$(HostArch)\native</LibNetHostPath>
1313
<!-- This tools version MUST match the same version as runtime uses to compile libnethost.lib -->
1414
<PlatformToolsetVersion>143</PlatformToolsetVersion>
1515
</PropertyGroup>
1616

1717
<!-- Platform is different during restore than during build. Therefore, restore everything when not building the product. -->
18-
<ItemGroup Condition="'$(MSBuildProjectExtension)' == '.vcxproj' and '$(DotNetBuild)' != 'true'">
18+
<ItemGroup Condition="'$(MSBuildProjectExtension)' == '.vcxproj' and ('$(DotNetBuild)' != 'true' OR '$(DotNetBuildPass)' == '2') ">
1919
<PackageReference Include="Microsoft.NETCore.App.Host.win-x64" Version="[$(LibNetHostAppPackVersion)]" PrivateAssets="all" ExcludeAssets="all" />
2020
<PackageReference Include="Microsoft.NETCore.App.Host.win-x86" Version="[$(LibNetHostAppPackVersion)]" PrivateAssets="all" ExcludeAssets="all" />
2121
<PackageReference Include="Microsoft.NETCore.App.Host.win-arm64" Version="[$(LibNetHostAppPackVersion)]" PrivateAssets="all" ExcludeAssets="all" />
2222
</ItemGroup>
2323

24-
<ItemGroup Condition="'$(MSBuildProjectExtension)' == '.vcxproj' and '$(DotNetBuild)' == 'true'">
24+
<ItemGroup Condition="'$(MSBuildProjectExtension)' == '.vcxproj' and '$(DotNetBuild)' == 'true' AND '$(DotNetBuildPass)' != '2' ">
2525
<PackageReference Include="Microsoft.NETCore.App.Host.win-$(TargetArchitecture)" Version="[$(LibNetHostAppPackVersion)]" PrivateAssets="all" ExcludeAssets="all" />
2626
</ItemGroup>
2727

0 commit comments

Comments
 (0)