Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Reopen] Fix ANCM installer on ARM64 #59483

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,80 @@
<DirectoryRef Id="INSTALLDIR">
<Directory Id="INSTALLLOCATION" ShortName="ANCM" Name="$(var.ProductName)">
<Directory Id="VersionDir" Name="$(var.ProductVersionString)">
<?if $(var.Platform) = "arm64" ?>
<Component Id="AspNetCoreModuleV2.forwarder"
Guid="08968573-05c1-4bf1-8879-7b818ac9525b"
Win64="$(var.IsWin64)">
<File Id="AspNetCoreModuleV2Dll.forwarder"
Name="aspnetcorev2.dll"
Source="$(var.ArtifactsDir)\bin\AspNetCoreModuleForwarders\aspnetcorev2.dll"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I ran a non-PR build against this branch, so I could test the updated hosting bundle on an arm64 machine myself. Unfortunately, I got a build error due to this file missing. And there's a similar error for aspnetcorev2_outofprocess.dll below.

##[error]src\Installers\Windows\AspNetCoreModule-Setup\ANCMIISExpressV2\ancm_iis_expressv2.wxs(171,0): error LGHT0103: (NETCORE_ENGINEERING_TELEMETRY=Build) The system cannot find the file 'D:\a_work\1\s\artifacts\bin\AspNetCoreModuleForwarders\aspnetcorev2.dll'.

https://dev.azure.com/dnceng-public/public/_build/results?buildId=908627&view=results

I started a new build at https://dev.azure.com/dnceng-public/public/_build/results?buildId=909937&view=results with the binlog enabled. I can look more into this tomorrow, but I posting this now in case @wtgodbe or @lextm has any insights that could save me time.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left a comment in AncmV2.wixproj to indicate how such dll files (pure forwarders) are generated in the workflow, so you might take a look there.

DiskId="1"
Vital="yes"/>
<RegistryKey Root="HKLM"
Key="SYSTEM\CurrentControlSet\Services\EventLog\Application\$(var.ProductShortName)">
<RegistryValue Name="EventMessageFile" Type="expandable"
Value="[#AspNetCoreModuleV2Dll.forwarder]" />
<RegistryValue Name="TypesSupported" Type="integer" Value="7" />
</RegistryKey>
</Component>
<Component Id="AspNetCoreModuleV2.x64"
Guid="1962b1b0-6345-4b37-97b3-a8f2c9e82bee"
Win64="$(var.IsWin64)">
<File Id="AspNetCoreModuleV2Dll.x64"
Name="aspnetcorev2_x64.dll"
Source="$(var.ArtifactsDir)\bin\AspNetCoreModuleShim\x64\$(var.Configuration)\aspnetcorev2.dll"
DiskId="1"
Vital="yes"/>
<RegistryKey Root="HKLM"
Key="SYSTEM\CurrentControlSet\Services\EventLog\Application\$(var.ProductShortName)">
<RegistryValue Name="EventMessageFile" Type="expandable"
Value="[#AspNetCoreModuleV2Dll.x64]" />
<RegistryValue Name="TypesSupported" Type="integer" Value="7" />
</RegistryKey>
</Component>
<Component Id="AspNetCoreModuleV2.arm64"
Guid="22f16c6c-7c53-422c-8ad5-831e4870a44e"
Win64="$(var.IsWin64)">
<File Id="AspNetCoreModuleV2Dll.arm64"
Name="aspnetcorev2_arm64.dll"
Source="$(var.AspNetCoreV2ProgramFilesTargetPath)"
DiskId="1"
Vital="yes"/>
<RegistryKey Root="HKLM"
Key="SYSTEM\CurrentControlSet\Services\EventLog\Application\$(var.ProductShortName)">
<RegistryValue Name="EventMessageFile" Type="expandable"
Value="[#AspNetCoreModuleV2Dll.arm64]" />
<RegistryValue Name="TypesSupported" Type="integer" Value="7" />
</RegistryKey>
</Component>
<Directory Id="HandlerVersionDir" Name="$(var.ANCMFolderVersion)">
<Component Id="AspNetCoreModuleHandler.forwarder"
Guid="51045d90-7231-480c-bac7-2969a2861ece" Win64="$(var.IsWin64)">
<File Id="AspNetCoreModuleHandlerDll.forwarder"
Name="aspnetcorev2_outofprocess.dll"
Source="$(var.ArtifactsDir)\bin\AspNetCoreModuleForwarders\aspnetcorev2_outofprocess.dll"
DiskId="1"
Vital="yes"/>
</Component>
<Component Id="AspNetCoreModuleHandler.x64"
Guid="0b192457-9c6a-4703-ba6a-0c5a58b7c9cb"
Win64="$(var.IsWin64)">
<File Id="AspNetCoreModuleHandlerDll.x64"
Name="aspnetcorev2_outofprocess_x64.dll"
Source="$(var.ArtifactsDir)\bin\OutOfProcessRequestHandler\x64\$(var.Configuration)\aspnetcorev2_outofprocess.dll"
DiskId="1"
Vital="yes"/>
</Component>
<Component Id="AspNetCoreModuleHandler.arm64"
Guid="21cc9da0-ab0a-4717-90df-dbaaa3f68510" Win64="$(var.IsWin64)">
<File Id="AspNetCoreModuleHandlerDll.arm64"
Name="aspnetcorev2_outofprocess_arm64.dll"
Source="$(var.AspNetCoreV2HandlerProgramFilesTargetPath)"
DiskId="1"
Vital="yes"/>
</Component>
</Directory>
<?else ?>
<Component Id="AspNetCoreModule" Guid="84ed6ce6-c8a3-4fa8-a872-c98a1d15dd4f" Win64="$(var.IsWin64)">
<File Id="AspNetCoreModuleDll"
Name="aspnetcorev2.dll"
Expand All @@ -186,6 +260,7 @@
</File>
</Component>
</Directory>
<?endif ?>
</Directory>
</Directory>
<Directory Id="IISConfigDir" Name="config">
Expand Down Expand Up @@ -249,8 +324,17 @@

<!-- Feature Definition -->
<Feature Id="AspNetCoreModuleFeature" Title="!(loc.AspNetCoreModuleProductTitle)" Description="!(loc.AspNetCoreModuleProductDescription)" Level="1">
<?if $(var.Platform) = "arm64" ?>
<ComponentRef Id="AspNetCoreModuleV2.forwarder" />
<ComponentRef Id="AspNetCoreModuleHandler.forwarder" />
<ComponentRef Id="AspNetCoreModuleV2.x64" />
<ComponentRef Id="AspNetCoreModuleHandler.x64" />
<ComponentRef Id="AspNetCoreModuleV2.arm64" />
<ComponentRef Id="AspNetCoreModuleHandler.arm64" />
<?else ?>
<ComponentRef Id="AspNetCoreModule"/>
<ComponentRef Id="AspNetCoreModuleHandler"/>
<?endif ?>
<ComponentRef Id="AspNetCoreSchema"/>
<?if $(var.Platform) != "x86" ?>
<ComponentRef Id="AspNetCoreModule.wow"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,8 @@
'$(PackageIconFullPath)' ^
'$(PackageLicenseExpression)' " />
</Target>

<Target Name="BeforeBuild" Condition="'$(Platform)' == 'arm64'">
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@halter73 The forwarder dll files are generated by this target. You might review MSBuild binlog to see why it wasn't triggered when you built the artifacts. I guess it was caused by condition mismatch.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could it be that this BeforeBuild target is simply missing from AncmIISExpressV2.wixproj? I tried pushing to the lextm-47290 branch at [email protected]:lextudio/httpplatformhandlerv2.git to update this PR and test it, but I got a permission error.

Copy link
Author

@lextm lextm Jan 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

En, I didn't add this target to AncmIISExpressV2.wixproj because not necessary if building everything out. But like you found out, if just building a few projects (not the entire solution) then that missing target can be a problem and lead to missing files during ANCM IIS Express installer builds.

I just pushed a new commit as you suggested addressing this.

<MSBuild Projects="..\Forwarders\build.proj" />
</Target>
</Project>
Loading
Loading