Skip to content

Split DiffEngineTray's package from the Windows head - #1015

Merged
SimonCropp merged 2 commits into
mainfrom
split-tray-pointer
Nov 1, 2026
Merged

SimonCropp merged 2 commits into
mainfrom
split-tray-pointer

Conversation

@SimonCropp

Copy link
Copy Markdown
Member

src/DiffEngineTray was two things: the Windows tray, and the DiffEngineTray package, which names a package for each RID and holds nothing else. Its build with no RID packed that list, and first built the Linux and Mac heads for each of their RIDs. So TrayHead.targets had a branch that only one head took (TrayPointer), and a Release build of the Windows tray built every other head six ways.

The change.

  • src/DiffEngineTray.Windows is the Windows head, moved as it was. It now sets AssemblyName and RootNamespace to DiffEngineTray, as the Linux and Mac heads do, so the core's InternalsVisibleTo still names it and its pictures and forms keep their resource names. Like the other two heads, its build with no RID packs nothing.

  • src/DiffEngineTray is the list package and nothing else:

    • ToolPackageRuntimeIdentifiers and PackTrayHeads, moved out of TrayHead.targets;
    • references to the three heads, for build order only.

    The SDK packs a tool only from an Exe, and builds that project even though the package holds none of its output. So the project has a three-line Program.cs that ships nowhere.

  • TrayPackage.props (new, in the core) holds what the package is called and says about itself: PackAsTool, PackageId, ToolCommandName and Description. TrayHead.targets and the list project both import it, so the description is written once.

  • TrayHead.targets loses its TrayPointer branches.

  • Paths:

    • the slnx, which keeps both projects Windows only;
    • the core's embedded pictures;
    • IconPixelsTests;
    • DiffEngineTray.Tests' reference to the head.
  • Docs: CLAUDE.md.

Tests. Locally on Windows, a Release build had no errors:

  • Packaging.Tests passed 53, against the existing snapshots.
  • DiffEngineTray.Tests passed 104.
  • DiffEngineTray.Core.Tests passed 321, with 4 skipped.

A Debug build also had no errors.

I also compared all seven packages with a Release build of main at the commit this branches from:

  • Every package has the same entries.
  • The Linux and macOS packages are byte for byte the same.
  • The Windows packages differ only in DiffEngineTray.dll. Its manifest resources are the same, and the difference is its embedded PDB, which records the moved source paths.
  • DiffEngineTray's nuspec no longer lists a Microsoft.WindowsDesktop.App.WindowsForms framework reference. That came from the Windows head, and doesn't apply to a package with no code in it.

Not seen working. CI's tray-install job installs from these packages on all three platforms, so this PR's run is the first install from them.

src/DiffEngineTray was both the Windows tray and the DiffEngineTray
package, which names a package for each RID and holds nothing else. Its
build for no RID packed that list, and first built the Linux and Mac
heads for each of their RIDs, so TrayHead.targets had a branch only one
head took (TrayPointer).

The head is now src/DiffEngineTray.Windows, named DiffEngineTray with
DiffEngineTray as its root namespace, as the other two heads are, so its
pictures and forms keep their resource names. src/DiffEngineTray is the
package and nothing else: ToolPackageRuntimeIdentifiers, PackTrayHeads,
and references to the three heads for build order only. The SDK packs a
tool only from an Exe, and builds it though the package holds none of
its output, so it has a Program.cs that ships nowhere. What the package
is called and says about itself is TrayPackage.props, which both import.

The seven packages have the same entries as before. The Linux and macOS
ones are byte for byte the same; the Windows head's dll differs only in
its embedded PDB, which names the moved source files. DiffEngineTray's
nuspec no longer names a Windows Forms framework reference, which came
from the Windows head and meant nothing for a package of no code.
@SimonCropp
SimonCropp merged commit 47851d0 into main Nov 1, 2026
14 checks passed
@SimonCropp
SimonCropp deleted the split-tray-pointer branch November 1, 2026 20:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant