Skip to content

[Correctness] AppConfig.cs — ConfigurationAppPublishDebugPath and ManagerAppPublishDebugPath point to Release folders #768

@Christophe-Rogiers

Description

@Christophe-Rogiers

Severity: Warning

Location: src/Servy.Core/Config/AppConfig.cs:143 and :158

Code:

// Line 143 — named "Debug" but uses ServyServiceUIReleaseFolder
public static readonly string ConfigurationAppPublishDebugPath =
    Path.Combine(ServyServiceUIReleaseFolder, "publish", "Servy.exe");

// Line 158 — named "Debug" but uses ServyManagerReleaseFolder
public static readonly string ManagerAppPublishDebugPath =
    Path.Combine(ServyManagerReleaseFolder, "publish", "Servy.Manager.exe");

Explanation:
Both variables are named *DebugPath but they compose their paths from the *ReleaseFolder constants. They are consumed under #if DEBUG branches in src/Servy/App.xaml.cs:171 and src/Servy.Manager/App.xaml.cs:212, which means that when running a Debug build of one app, it looks for the counterpart app inside a Release output folder.

The effect is that IsConfigurationAppAvailable / IsManagerAppAvailable will be false unless the other project has been built in Release — an unexpected dependency for a Debug-only code path. Either the constant names are wrong or the path sources are wrong.

Suggested fix:
If the intent is truly to resolve the sibling app from its Release output (for testing the release binary from a Debug build), rename the constants to *PublishReleasePath or *CrossBuildPath so callers aren't misled. Otherwise, compose the paths from ServyServiceUIDebugFolder / ServyServiceManagerDebugFolder to match the name.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions