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

IDE0051 on private json constructors #35767

Closed
JranZu opened this issue May 16, 2019 · 1 comment
Closed

IDE0051 on private json constructors #35767

JranZu opened this issue May 16, 2019 · 1 comment
Assignees
Milestone

Comments

@JranZu
Copy link

JranZu commented May 16, 2019

After moving to VS 2019 I started seeing IDE0051 showing up on all of my private JSON constructors. This should not be shown or there should be an easy way to disable this.

@jcouv jcouv added the Area-IDE label May 16, 2019
@jinujoseph jinujoseph added the Bug label May 22, 2019
@jinujoseph jinujoseph added this to the 16.2 milestone May 22, 2019
@mavasani
Copy link
Contributor

This is by design. If there is no use of the constructor in source code, IDE0051 will fire. You have following choices:

  1. Add pragma suppressions or suppress message attribute suppressions
  2. Disable IDE0051 for your project or solution using ruleset files
  3. Author a diagnostic suppressor to programmatically suppress IDE0051 on private json constructors. See Add new analyzer API (DiagnosticSuppressor) to allow programmatic sup… #36067

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

No branches or pull requests

4 participants