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

Consider suppressing new CS8981 compiler warning. #567

Closed
RachelDavids opened this issue Jun 1, 2022 · 1 comment · Fixed by #574
Closed

Consider suppressing new CS8981 compiler warning. #567

RachelDavids opened this issue Jun 1, 2022 · 1 comment · Fixed by #574
Assignees
Labels
enhancement New feature or request

Comments

@RachelDavids
Copy link

RachelDavids commented Jun 1, 2022

Is your feature request related to a problem? Please describe.

I have TreatWarnigsAsErrors set to true in my project file, so that I can guard against as many issues as possible.
As such I get the following, potentially 100s of times, depending on framework selection (multiple) and requested native methods.
Error CS8981: The type name 'winmdroot' only contains lower-cased ascii characters. Such names may become reserved for the language. (18, 9)

See here for further details Compiler Warning Waves

Identifying which issues are created in my code as opposed to the generated code becomes difficult when there are so many of them.

Describe the solution you'd like
I would prefer if the generated code does not fall foul of this (and, if possible), any other new compiler warnings.

Describe alternatives you've considered
Using $(NoWarn);CS8981 does suppress this issue temporarily, but does mean that I cannot spot my own issues.

Additional context
Add any other context or screenshots about the feature request here.

@RachelDavids RachelDavids added the enhancement New feature or request label Jun 1, 2022
@AArnott AArnott self-assigned this Jun 1, 2022
@AArnott
Copy link
Member

AArnott commented Jun 1, 2022

I wish we could suppress all such future warnings. We already effectively turn off stylecop by indicating that this is generated code, but the C# compiler warnings aren't always as accommodating to that. We'll have to suppress or fix these new warnings as they come up. Thanks for reporting.

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

Successfully merging a pull request may close this issue.

2 participants