Skip to content

[Code Quality] Servy.Service ServiceHelper.cs — duplicate using Servy.Core.Config directive #802

@Christophe-Rogiers

Description

@Christophe-Rogiers

Severity: Info

File: src/Servy.Service/Helpers/ServiceHelper.cs lines 1-4

Description:

#if !DEBUG
using Servy.Core.Config;
#endif
using Servy.Core.Config;
using Servy.Core.Data;
...

In Release builds both directives are active, triggering CS0105: The using directive for 'Servy.Core.Config' appeared previously in this namespace. The compiler emits a warning on every Release build. In Debug builds only the unconditional one applies, so the conditional wrapper has no effect either way.

This looks like a leftover from a commit that wanted Servy.Core.Config available only in Release paths; the subsequent unconditional import made the #if !DEBUG block dead code.

Suggested fix:

Remove lines 1-3:

using Servy.Core.Config;
using Servy.Core.Data;
...

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