Verify C# compiler options documentation - issue already resolved #47733
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR verifies the resolution of issue #34900 regarding incorrect C# compiler option documentation for warning-related flags.
Issue Analysis
The original issue reported that the documentation incorrectly showed:
WarningsAsErrors
mapped to-warnaserror
(should be-warnaserror+
)WarningsNotAsErrors
mapped to-warnnotaserror
(should be-warnaserror-
)The issue also noted that MSBuild supports
-warnNotAsError
but the documentation should show csc.exe options rather than MSBuild options.Current State
Upon investigation, the documentation in
docs/csharp/language-reference/compiler-options/errors-warnings.md
already shows the correct syntax:TreatWarningsAsErrors
-warnaserror
WarningsAsErrors
-warnaserror+
WarningsNotAsErrors
-warnaserror-
Verification Results
-warnnotaserror
syntax found in the codebase-warnaserror+
and-warnaserror-
syntax already documentedThe issue appears to have been resolved at some point after it was filed in April 2023. The documentation now correctly shows the csc.exe compiler options exactly as requested in the original issue.
Fixes #34900.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.