0

I add swagger to my asp.net project. there are a lot of warnings

the warning code is blank. so I cannot disable it through 1591. please help me

enter image description here

萧逸清
  • 165
  • 3
  • 11
  • Does this answer your question? [Visual Studio Disabling Missing XML Comment Warning](https://stackoverflow.com/questions/7982525/visual-studio-disabling-missing-xml-comment-warning) – MDT Apr 08 '22 at 05:01
  • that warning has code 1591. but my warning code is blank – 萧逸清 Apr 08 '22 at 05:18
  • Either document the methods (surely the whole reason you're pulling in swagger, no?) or change the accessibility of classes/methods that have been declared public and should not have been. Both of those sound more sensible than turning on documentation and then trying to suppress warnings about a lack of documentation. – Damien_The_Unbeliever Apr 08 '22 at 07:09

2 Answers2

0

Disable "XML documentation file"

Vincent
  • 510
  • 1
  • 5
  • 23
0

You can add to your code this line to suppress the warning:

#pragma warning disable 1591
Yanga
  • 2,885
  • 1
  • 29
  • 32