-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Fix ASP.NET Core module installer upgrade issues #60769
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -164,22 +164,63 @@ | |
<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" | ||
<Component Id="AspNetCoreModule" Guid="84ed6ce6-c8a3-4fa8-a872-c98a1d15dd4f" Win64="$(var.IsWin64)"> | ||
<?if $(var.Platform) = "arm64" ?> | ||
<File Id="AspNetCoreModuleDll" | ||
Name="aspnetcorev2.dll" | ||
Source="$(var.ArtifactsDir)\bin\AspNetCoreModuleForwarders\aspnetcorev2.dll" | ||
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> | ||
<?else ?> | ||
<File Id="AspNetCoreModuleDll" | ||
Name="aspnetcorev2.dll" | ||
Source="$(var.AspNetCoreV2ProgramFilesTargetPath)" | ||
DiskId="1" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
Vital="yes"/> | ||
<?endif ?> | ||
<RegistryKey Root="HKLM" Key="SYSTEM\CurrentControlSet\Services\EventLog\Application\$(var.ProductShortName)"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The general rule for components is one file/reg key per component. When performing repairs, the keypath of the component is used to determine its state and whether it needs to be reinstalled during a repair. If non-keypath items are missing or damaged, repairs my not necessarily work. It's likely repair will write the registry keys again since WiX by default will set the reinstall mode to include registry keys. Just calling it out in case this is an issue. |
||
<RegistryValue Name="EventMessageFile" Type="expandable" Value="[#AspNetCoreModuleDll]"/> | ||
<RegistryValue Name="TypesSupported" Type="integer" Value="7"/> | ||
</RegistryKey> | ||
</Component> | ||
<Directory Id="HandlerVersionDir" Name="$(var.ANCMFolderVersion)" > | ||
<Component Id="AspNetCoreModuleHandler" Guid="559EF726-B25C-480F-AFA4-32D0BA8B2376" Win64="$(var.IsWin64)"> | ||
<?if $(var.Platform) = "arm64" ?> | ||
<File Id="AspNetCoreModuleHandlerDll" | ||
Name="aspnetcorev2_outofprocess.dll" | ||
Source="$(var.ArtifactsDir)\bin\AspNetCoreModuleForwarders\aspnetcorev2_outofprocess.dll" | ||
DiskId="1" | ||
Vital="yes"/> | ||
<?else ?> | ||
<File Id="AspNetCoreModuleHandlerDll" | ||
Name="aspnetcorev2_outofprocess.dll" | ||
Source="$(var.AspNetCoreV2HandlerProgramFilesTargetPath)" | ||
DiskId="1" | ||
Vital="yes"> | ||
</File> | ||
<?endif ?> | ||
</Component> | ||
<?if $(var.Platform) = "arm64" ?> | ||
<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> | ||
<?endif ?> | ||
</Directory> | ||
<?if $(var.Platform) = "arm64" ?> | ||
<Component Id="AspNetCoreModuleV2.x64" | ||
Guid="1962b1b0-6345-4b37-97b3-a8f2c9e82bee" | ||
Win64="$(var.IsWin64)"> | ||
|
@@ -210,56 +251,6 @@ | |
<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" | ||
Source="$(var.AspNetCoreV2ProgramFilesTargetPath)" | ||
DiskId="1" | ||
Vital="yes"> | ||
</File> | ||
<RegistryKey Root="HKLM" Key="SYSTEM\CurrentControlSet\Services\EventLog\Application\$(var.ProductShortName)"> | ||
<RegistryValue Name="EventMessageFile" Type="expandable" Value="[#AspNetCoreModuleDll]"/> | ||
<RegistryValue Name="TypesSupported" Type="integer" Value="7"/> | ||
</RegistryKey> | ||
</Component> | ||
<Directory Id="HandlerVersionDir" Name="$(var.ANCMFolderVersion)" > | ||
<Component Id="AspNetCoreModuleHandler" Guid="559EF726-B25C-480F-AFA4-32D0BA8B2376" Win64="$(var.IsWin64)"> | ||
<File Id="AspNetCoreModuleHandlerDll" | ||
Name="aspnetcorev2_outofprocess.dll" | ||
Source="$(var.AspNetCoreV2HandlerProgramFilesTargetPath)" | ||
DiskId="1" | ||
Vital="yes"> | ||
</File> | ||
</Component> | ||
</Directory> | ||
<?endif ?> | ||
</Directory> | ||
</Directory> | ||
|
@@ -324,16 +315,13 @@ | |
|
||
<!-- Feature Definition --> | ||
<Feature Id="AspNetCoreModuleFeature" Title="!(loc.AspNetCoreModuleProductTitle)" Description="!(loc.AspNetCoreModuleProductDescription)" Level="1"> | ||
<ComponentRef Id="AspNetCoreModule"/> | ||
<ComponentRef Id="AspNetCoreModuleHandler"/> | ||
<?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" ?> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
call %1 -host_arch=x64 -arch=arm64 -no_logo | ||
call build.cmd %2 %3 | ||
call build.cmd %2 %3 %4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should consider setting the
File@KeyPath="yes"
. If child elements of a component do not have a keypath set, and the parent directory of the component is not a key path, then the first child is selected. In this case, it would be the file. However, if you modify the order, the key path will change. Setting it explicitly will avoid issues in the future.This might be a good read: https://learn.microsoft.com/en-us/windows/win32/msi/what-happens-if-the-component-rules-are-broken