Skip to content

Silence AVLN3001 warnings via NoWarn#316

Merged
erikdarlingdata merged 1 commit intodevfrom
chore/silence-avln3001-warnings
May 9, 2026
Merged

Silence AVLN3001 warnings via NoWarn#316
erikdarlingdata merged 1 commit intodevfrom
chore/silence-avln3001-warnings

Conversation

@erikdarlingdata
Copy link
Copy Markdown
Owner

Summary

The 5 AVLN3001 ("XAML resource won't be reachable via runtime loader, no public constructor was found") warnings on every build flag scenarios that aren't used in this project:

  • Affected controls: QuerySessionControl, QueryStoreGridControl, QueryStoreOverviewControl, ConnectionDialog, QueryStoreHistoryWindow
  • All take typed constructor dependencies (ServerConnection, ICredentialService, etc.)
  • All are instantiated directly in code-behind — never via AvaloniaXamlLoader.Load()
  • The Avalonia IDE previewer isn't used in this project (no Design.DataContext anywhere)

Adds <NoWarn>$(NoWarn);AVLN3001</NoWarn> in src/Directory.Build.props so it applies to every SDK-style project under src/. Includes a comment block explaining why so a future reader doesn't reflexively re-enable it.

If the previewer ever becomes load-bearing, the right move is to remove this suppression and add parameterless constructors to the flagged controls.

Test plan

  • dotnet build from a clean state — confirm 0 warnings, 0 errors
  • No behavior change at runtime expected

🤖 Generated with Claude Code

All flagged controls (QuerySessionControl, QueryStoreGridControl,
QueryStoreOverviewControl, ConnectionDialog, QueryStoreHistoryWindow)
take typed constructor dependencies and are instantiated directly in
code-behind. They are never loaded via AvaloniaXamlLoader.Load() and
the Avalonia IDE previewer isn't used in this project, so the warning
flags scenarios that aren't load-bearing.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@erikdarlingdata erikdarlingdata merged commit 3580426 into dev May 9, 2026
2 checks passed
@erikdarlingdata erikdarlingdata deleted the chore/silence-avln3001-warnings branch May 9, 2026 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant