Skip to content

devicehost: stop re-signing and rely on MSIRMSHUTDOWN for file-in-use handling#40080

Merged
OneBlue merged 3 commits intofeature/wsl-for-appsfrom
user/benhill/wsldevicehost_stop_install_wfa
Apr 2, 2026
Merged

devicehost: stop re-signing and rely on MSIRMSHUTDOWN for file-in-use handling#40080
OneBlue merged 3 commits intofeature/wsl-for-appsfrom
user/benhill/wsldevicehost_stop_install_wfa

Conversation

@benhillis
Copy link
Copy Markdown
Member

@benhillis benhillis commented Apr 2, 2026

Cherry-pick of #40075 onto feature/wsl-for-apps.

This change:

  • Sources wsldevicehost.dll directly from the DeviceHost package output (already signed), removing redundant re-signing
  • Removes wsldevicehost.dll from the build-stage publish pattern
  • Removes the CMake staging link for wsldevicehost.dll
  • Bumps Microsoft.WSL.DeviceHost to 1.2.10-0
  • Relies on the existing MSIRMSHUTDOWN=1 MSI property to handle file-in-use scenarios during install, instead of a custom action

@benhillis benhillis requested a review from a team as a code owner April 2, 2026 19:37
Copilot AI review requested due to automatic review settings April 2, 2026 19:37
@benhillis benhillis force-pushed the user/benhill/wsldevicehost_stop_install_wfa branch from 687177b to f49b24b Compare April 2, 2026 19:39
@benhillis benhillis enabled auto-merge (squash) April 2, 2026 19:41
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the WSL MSI packaging/staging flow to stop re-signing wsldevicehost.dll and instead consume the already-signed binary directly from the Microsoft.WSL.DeviceHost NuGet package, while relying on Windows Installer’s Restart Manager behavior for in-use file replacement.

Changes:

  • Bump Microsoft.WSL.DeviceHost NuGet dependency to 1.2.10-0.
  • Source wsldevicehost.dll directly from the DeviceHost package output and remove the local CMake staging link + build-stage publish pattern entry.
  • Enable MSIRMSHUTDOWN=1 in the MSI to improve handling of file-in-use scenarios.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
packages.config Updates DeviceHost package version used by the build.
msipackage/package.wix.in Switches the wsldevicehost.dll source path to the NuGet package output and enables MSIRMSHUTDOWN=1.
CMakeLists.txt Removes the staging symlink creation for wsldevicehost.dll in the build output.
.pipelines/build-stage.yml Stops publishing wsldevicehost.dll from the build-stage artifacts.

Comment on lines 677 to 680
See: https://learn.microsoft.com/en-us/windows/win32/msi/msirmshutdown
-->
<Property Id="MSIRMSHUTDOWN" Value="0" Secure="yes" />
<Property Id="MSIRMSHUTDOWN" Value="1" Secure="yes" />
</Package>
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

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

MSIRMSHUTDOWN is now hard-coded to 1, but the preceding comment says this is only “during upgrade”. With the property set unconditionally at the package level it can also affect first-time installs/repairs. Either update the comment to match the new behavior, or conditionally set MSIRMSHUTDOWN=1 only for upgrade scenarios (e.g., when WIX_UPGRADE_DETECTED/UPGRADINGPRODUCTCODE indicates an upgrade).

Copilot uses AI. Check for mistakes.
@OneBlue
Copy link
Copy Markdown
Collaborator

OneBlue commented Apr 2, 2026

Overriding to get a release build sooner. The wslc test passed a full testpass was done on master

@OneBlue OneBlue disabled auto-merge April 2, 2026 20:25
@OneBlue OneBlue merged commit 26a8a0d into feature/wsl-for-apps Apr 2, 2026
4 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants