Skip to content

#pragma warning format disable / enable cannot be "looked up" in Visual Studio - not indexed at MS Learnย #36053

@Cornan

Description

@Cornan

I'm trying to find the formal documentation for:
#pragma warning disable format
#pragma warning restore format

1) I haven't been able to find this pragma at Microsoft Learn (it does work for me in VS 2022); I'm guessing either it is not indexed or not present. It seems there is an expectation that the (MS Learn) user will have warning numbers, as indicated by the "filter by title" heading and this highlighted note on this web page:

To find warning numbers in Visual Studio, build your project and then look for the warning numbers in the Output window.

However, 2) this pragma does not generate warnings, therefore, if it is indexed by "warning number", then I have no way of looking it up.

You may take this feedback to be a combination of "make sure this pragma is documented" and "make sure that this pragma, and others that do not relate to Visual Studio warning numbers, can be found at MS Learn."

Perhaps the highlighted note should be edited to note that not all pragmas are associated with Visual Studio warnings.

Thank you!

P.S. Implied in the fact that I am posting this feedback, I consider this an important #pragma and I'd like to be able to encourage the use of this #pragma and continued support by Microsoft by referencing said documentation.
[Enter feedback here]


Document Details

โš  Do not edit this section. It is required for learn.microsoft.com โžŸ GitHub issue linking.


Associated WorkItem - 350761

Metadata

Metadata

Assignees

Labels

๐Ÿ“Œ seQUESTeredIdentifies that an issue has been imported into Quest.dotnet-csharp/svcin-prThis issue will be closed (fixed) by an active pull request.lang-reference/subsvcokr-freshnessOKR: Freshness of contentokr-qualityContent-quality KR: Concerns article defects (bugs), freshness, or build warnings.

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions