Skip to content

Commit 71aebbe

Browse files
Rescue ManagedLgIcuCollator.manifest in patch builds (PYRO0305) (#934)
Commit 846c123 ("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 <noreply@anthropic.com>
1 parent 93d0865 commit 71aebbe

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

Build/Installer.legacy.targets

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,8 @@
118118
<RemovedSinceLastBase Include="$(dir-outputBase)/ManagedVwWindow.pdb" />
119119
<RemovedSinceLastBase Include="$(dir-outputBase)/ManagedVwWindow.manifest" />
120120
<RemovedSinceLastBase Include="$(dir-outputBase)/SimpleRootSite.manifest" />
121+
<!-- ManagedLgIcuCollator.manifest dropped by #904 "Reduce optional COM usage"; the DLL still ships. -->
122+
<RemovedSinceLastBase Include="$(dir-outputBase)/ManagedLgIcuCollator.manifest" />
121123
</ItemGroup>
122124
<WriteLinesToFile
123125
File="%(RemovedSinceLastBase.FullPath)"

FLExInstaller/AGENTS.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ Minimal installer guidance for agents.
1313
- Heat exclusions: **`PatchableInstallerHeatExclude.xml`** is copied to **`PatchableInstaller/BaseInstallerBuild/heat-exclude.xml`** before Heat (see **`Build/Installer.legacy.targets`** `CopyFilesToInstall`).
1414
- **`buildMsi.bat`** passes **`-fv`** to **`light.exe`** so **`MsiAssemblyName`** includes **fileVersion** (same intent as MSBuild **`SetMsiAssemblyNameFileVersion=true`**), which helps GAC servicing when **`AssemblyVersion`** is unchanged but the binary’s **file version** increases.
1515
- Newtonsoft.Json and similar authored components live in **`CustomComponents.wxi`** (overlays **`PatchableInstaller/Common`**), with definitions guarded by **`<?ifdef MASTERBUILDDIR?>`** so patch/update authoring omits them when only **`UPDATEBUILDDIR`** is set. Add matching **`ComponentRef`** entries in **`FLExInstaller/CustomFeatures.wxi`** inside the **same** **`<?ifdef MASTERBUILDDIR?>...<?endif?>`** 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**).
16+
- **Patch error `PYRO0305: The File '<name>' 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`).
17+
- **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`.
18+
- **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).
19+
- **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.
1620

1721
## Constraints
1822

0 commit comments

Comments
 (0)