diff --git a/.pipelines/build-stage.yml b/.pipelines/build-stage.yml
index 8aa4e92ab..c9b96063e 100644
--- a/.pipelines/build-stage.yml
+++ b/.pipelines/build-stage.yml
@@ -24,7 +24,7 @@ parameters:
type: object
default:
- target: "wsl;libwsl;wslg;wslservice;wslhost;wslrelay;wslinstaller;wslinstall;initramfs;wslserviceproxystub;wslsettings;wslinstallerproxystub;testplugin"
- pattern: "wsl.exe,libwsl.dll,wslg.exe,wslservice.exe,wslhost.exe,wslrelay.exe,wslinstaller.exe,wslinstall.dll,wslserviceproxystub.dll,wslsettings/wslsettings.dll,wslsettings/wslsettings.exe,wslinstallerproxystub.dll,wsldevicehost.dll,WSLDVCPlugin.dll,testplugin.dll,wsldeps.dll"
+ pattern: "wsl.exe,libwsl.dll,wslg.exe,wslservice.exe,wslhost.exe,wslrelay.exe,wslinstaller.exe,wslinstall.dll,wslserviceproxystub.dll,wslsettings/wslsettings.dll,wslsettings/wslsettings.exe,wslinstallerproxystub.dll,WSLDVCPlugin.dll,testplugin.dll,wsldeps.dll"
- target: "msixgluepackage"
pattern: "gluepackage.msix"
- target: "msipackage"
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d55d3a9ee..de4dce8c9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -157,7 +157,6 @@ set (GENERATED_DIR ${CMAKE_BINARY_DIR}/generated)
file(MAKE_DIRECTORY ${GENERATED_DIR})
set(PACKAGE_CERTIFICATE ${GENERATED_DIR}/dev-cert.pfx)
-file(CREATE_LINK ${WSL_DEVICE_HOST_SOURCE_DIR}/bin/${TARGET_PLATFORM}/wsldevicehost.dll ${BIN}/wsldevicehost.dll)
file(CREATE_LINK ${WSLG_SOURCE_DIR}/${TARGET_PLATFORM}/${WSLG_TS_PLUGIN_DLL} ${BIN}/${WSLG_TS_PLUGIN_DLL})
file(CREATE_LINK ${WSLDEPS_SOURCE_DIR}/bin/wsldeps.dll ${BIN}/wsldeps.dll)
diff --git a/msipackage/package.wix.in b/msipackage/package.wix.in
index 6ebc9f3b2..a0ec1b700 100644
--- a/msipackage/package.wix.in
+++ b/msipackage/package.wix.in
@@ -221,6 +221,8 @@
N.B. It shouldn't be started on install because it will fail to start if the OC is missing,
which would fail the install. -->
+
+
@@ -232,7 +234,6 @@
-
@@ -551,7 +552,7 @@
-
+
diff --git a/packages.config b/packages.config
index 678c68d64..22cc87bb7 100644
--- a/packages.config
+++ b/packages.config
@@ -18,7 +18,7 @@
-
+
diff --git a/test/windows/InstallerTests.cpp b/test/windows/InstallerTests.cpp
index c578ba91a..423b05815 100644
--- a/test/windows/InstallerTests.cpp
+++ b/test/windows/InstallerTests.cpp
@@ -175,8 +175,17 @@ class InstallerTests
return wsl::windows::common::registry::ReadString(m_lxssKey.get(), L"MSI", L"ProductCode", L"");
}
+ // Release any in-process COM DLLs (e.g. wslserviceproxystub.dll loaded by prior tests)
+ // so the Restart Manager doesn't detect the test process as holding files.
+ // This avoids install failures on older Server SKUs where the RM has stricter silent-mode behavior.
+ static void PrepareForMsiOperation()
+ {
+ CoFreeUnusedLibrariesEx(0, 0);
+ }
+
void UninstallMsi()
{
+ PrepareForMsiOperation();
auto productCode = GetMsiProductCode();
VERIFY_IS_FALSE(productCode.empty());
@@ -185,6 +194,7 @@ class InstallerTests
void InstallMsi()
{
+ PrepareForMsiOperation();
CallMsiExec(std::format(L"/qn /norestart /i {} /L*V {}", m_msiPath, GenerateMsiLogPath()));
}
@@ -367,6 +377,7 @@ class InstallerTests
LogInfo("Installing: %ls", installerFile.c_str());
if (wsl::shared::string::EndsWith(installerFile, L".msi"))
{
+ PrepareForMsiOperation();
CallMsiExec(std::format(L"/qn /norestart /i {} /L*V {}", installerFile, GenerateMsiLogPath()));
}
else