From 8ce0eb7f7ee9d961f0bd8a72ecff8d3f4cc76286 Mon Sep 17 00:00:00 2001 From: Jason Naylor Date: Tue, 9 Jun 2026 11:37:44 -0700 Subject: [PATCH] Rescue ManagedLgIcuCollator.manifest in patch builds (PYRO0305) Commit 846c1235e ("Reduce optional COM usage", #904) stopped emitting the reg-free COM manifest ManagedLgIcuCollator.manifest, but the base release still ships it. WiX 3 pyro then fails the patch build with PYRO0305 because files cannot be removed in a patch. Add the manifest to the RescuePatching target's RemovedSinceLastBase list so a zero-byte placeholder is staged into the build output. The file is then present in both the Master and Update harvests, so pyro treats it as changed rather than removed. This mirrors the existing ManagedVwWindow.manifest and SimpleRootSite.manifest entries. Also document the error and this fix in FLExInstaller/AGENTS.md for future occurrences. Co-Authored-By: Claude Opus 4.8 --- Build/Installer.legacy.targets | 2 ++ FLExInstaller/AGENTS.md | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/Build/Installer.legacy.targets b/Build/Installer.legacy.targets index 6a4997dac9..fe175fe224 100644 --- a/Build/Installer.legacy.targets +++ b/Build/Installer.legacy.targets @@ -118,6 +118,8 @@ + + `** so patch/update authoring omits them when only **`UPDATEBUILDDIR`** is set. Add matching **`ComponentRef`** entries in **`FLExInstaller/CustomFeatures.wxi`** inside the **same** **`...`** so patch builds do not emit dangling refs (**LGHT0094**). WiX 6 **`Framework.wxs`** uses the same pattern for **`Feature Complete`**. Do not use **`FeatureRef Id="Complete"`** from an include that appears before **`Framework.wxs`** defines `Complete` (Light **LGHT0095**). +- **Patch error `PYRO0305: The File '' was removed in the patch`:** a file present in the base/**Master** harvest is missing from the new **Update** harvest, and WiX 3 **`pyro.exe`** forbids removing files in a patch. Typical trigger: a code change stops emitting a file the base release still ships — e.g. reg-free COM manifests dropped by a "reduce COM usage" change (`ManagedLgIcuCollator.manifest`, `ManagedVwWindow.manifest`). + - **Stopgap fix (patch against the existing base):** add the dropped file to the **`RemovedSinceLastBase`** item list in the **`RescuePatching`** target of **`Build/Installer.legacy.targets`** (runs via `BuildProduct`). It writes a zero-byte placeholder into the build output (**`$(dir-outputBase)`**) so the file appears in both harvests and `pyro` treats it as *changed*, not *removed*. Mirror the existing entries (`ManagedVwWindow.manifest`, `SimpleRootSite.manifest`) and add **only** the basenames actually dropped — usually just the `*.manifest`, not a still-shipping `.dll`. + - **Permanent fix:** cut a new **Base** build so the file is absent from Master too, then delete the now-stale `RemovedSinceLastBase` entries (the target comment notes a base build should warn when these exist). + - **Do not** add it to **`PatchableInstallerHeatExclude.xml`** — that list is for artifacts that must never be harvested (build-output dedup / test-only files), not for reconciling files removed since the base. ## Constraints