Visual Studio Disabling Missing XML Comment Warning

Nivid Dholakia picture Nivid Dholakia · Nov 2, 2011 · Viewed 94.2k times · Source

I have a project with over 500 Missing XML Comment warnings. I know I can remove the XML Comment feature, or paste empty comment snippets everywhere, but I'd prefer a generic solution where I can make one change that disables all warnings of this type.

What I do just now is putting

///<Summary>
/// 
///</Summary>

or

#pragma warning disable 1591

was just curious if it would be possible.

Answer

Gorgsenegger picture Gorgsenegger · Dec 16, 2011

As suggested above, in general I don't think that these warnings should be ignored (suppressed). To summarise, the ways around the warning would be to:

  • Suppress the warning by changing the project Properties > Build > Errors and warnings > Suppress warnings by entering 1591
  • Add the XML documentation tags (GhostDoc can be quite handy for that)
  • Suppress the warning via compiler options
  • Uncheck the "XML documentation file" checkbox in project Properties > Build > Output
  • Add #pragma warning disable 1591 at the top of the respective file and #pragma warning restore 1591 at the bottom