Skip to content

Register the tray's real path at startup - #815

Merged
SimonCropp merged 1 commit into
mainfrom
fix-startup-registry-path
Aug 22, 2026
Merged

Register the tray's real path at startup#815
SimonCropp merged 1 commit into
mainfrom
fix-startup-registry-path

Conversation

@SimonCropp

Copy link
Copy Markdown
Member

Startup.Add guessed %USERPROFILE%.dotnet\tools\DiffEngineTray.exe. That is only
right for a default global install: a --tool-path install, a DOTNET_CLI_HOME
that moves the tools directory, or simply running a local build all registered a
path with nothing at it. The tray then never started at login, while the Options
checkbox - which reads the settings file, not the registry - went on saying it
would.

Environment.ProcessPath is where this executable actually is. The value is also
quoted now, since a Run entry is a command line and an unquoted path containing
a space is read as a program name followed by arguments.

I also tried pointing the Options checkbox at Startup.Exists, so it reports what
the registry says rather than what the settings file wants. That makes the
form's rendering depend on the registry of whatever machine runs the tests, and
it broke two OptionsForm snapshots here for that reason - so it is not in this
commit. With the path itself correct the two agree in the ordinary case, and
making a snapshot test read machine state to fix a display nit is a bad trade.

Startup.Add guessed %USERPROFILE%\.dotnet\tools\DiffEngineTray.exe. That is only
right for a default global install: a --tool-path install, a DOTNET_CLI_HOME
that moves the tools directory, or simply running a local build all registered a
path with nothing at it. The tray then never started at login, while the Options
checkbox - which reads the settings file, not the registry - went on saying it
would.

Environment.ProcessPath is where this executable actually is. The value is also
quoted now, since a Run entry is a command line and an unquoted path containing
a space is read as a program name followed by arguments.

I also tried pointing the Options checkbox at Startup.Exists, so it reports what
the registry says rather than what the settings file wants. That makes the
form's rendering depend on the registry of whatever machine runs the tests, and
it broke two OptionsForm snapshots here for that reason - so it is not in this
commit. With the path itself correct the two agree in the ordinary case, and
making a snapshot test read machine state to fix a display nit is a bad trade.
@SimonCropp SimonCropp added this to the 20.0.0 milestone Aug 22, 2026
@SimonCropp
SimonCropp merged commit c315787 into main Aug 22, 2026
10 checks passed
@SimonCropp
SimonCropp deleted the fix-startup-registry-path branch August 22, 2026 07:10
This was referenced Aug 26, 2026
This was referenced Aug 27, 2026
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