Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CA1812 false report even when the class is initialized in xaml #4691

Open
Jebarson opened this issue Jan 13, 2021 · 2 comments
Open

CA1812 false report even when the class is initialized in xaml #4691

Jebarson opened this issue Jan 13, 2021 · 2 comments
Assignees
Labels
Milestone

Comments

@Jebarson
Copy link

Warning CA1812 XXX is an internal class that is apparently never instantiated. If so, remove the code from the assembly. If this class is intended to contain only static members, make it static (Shared in Visual Basic).

.Net Core 3.1
VS 2019 Enterprise

The warning pops up even when the class is initialized in the xaml. In this specific case, it was a class implementing IValueConverter that is referred in app.xaml and named

Expected Behavior
The analysis should be able to look at xaml for references before popping up the warning

@mavasani mavasani self-assigned this Jan 14, 2021
@mavasani mavasani added this to the Unknown milestone Jan 19, 2021
@Youssef1313
Copy link
Member

Similar issue: #3288

@symbiogenesis
Copy link

I have seen this. Verified that it is still an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants