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

TreatSpecificWarningsAsErrors does not work #8195

Closed
dleeapho opened this issue May 2, 2017 · 3 comments
Closed

TreatSpecificWarningsAsErrors does not work #8195

dleeapho opened this issue May 2, 2017 · 3 comments
Assignees
Milestone

Comments

@dleeapho
Copy link

dleeapho commented May 2, 2017

@bungeemonkee commented on Wed Apr 26 2017

I'm having a problem with dotnet build not respecting the TreatSpecificWarningsAsErrors option in the csproj. It's a .net standard 1.4 project being built with version 1.03 of the cli and msbuild 15.1.1012.6693. If I set TreatSpecificWarningsAsErrors to either 'CS1519' or just '1519' it doesn't treat the warning as an error.

I've tried several other error numbers in TreatSpecificWarningsAsErrors and it seems to ignore the value regardless.

Side note: If I set TreatWarningsAsErrors to 'True' it fails for other warnings but CS1519 is now ignored entirely (not displayed as a warning or an error) regardless of the value of TreatSpecificWarningsAsErrors .

Just for reference, CS1519 is the error 'Missing XML comment for publicly visible type or member...'.

Thanks!


@ellismg commented on Thu Apr 27 2017

/cc @livarcocc Can you move this to the correct place (I'm not sure if it's roslyn, the CLI or msbuild?)

@dleeapho
Copy link
Author

dleeapho commented May 2, 2017

@livarcocc moved it to CLI for now. Please route.

@dsplaisted
Copy link
Member

Has the TreatSpecificWarningsAsErrors property ever worked? I don't see any reference to it.

Looking at the CSharp targets, it looks like the WarningsAsErrors property may be what you're looking for.

I'm going to close this issue, but feel free to reopen it (or to file a new one in https://github.com/dotnet/roslyn or https://github.com/microsoft/msbuild) if this doesn't resolve it for you.

@bungeemonkee
Copy link

@dsplaisted Thank you! I was trying to use TreatSpecificWarningsAsErrors because when I edited the project properties with the VS 2015 gui that's the property it put in the csporj file. Guess I need to report a separate bug with VS.

@msftgits msftgits transferred this issue from dotnet/cli Jan 31, 2020
@msftgits msftgits added this to the 2.0.0 milestone Jan 31, 2020
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

No branches or pull requests

4 participants