How to ignore a class when generating XML documentation for a Visual Studio project?
c#, documentation-generation, visual-studio
Solution
In the class file, place a pragma at the top of the file to disable the given warning number.
#pragma warning disable (warning #)
The error number for xml documentation warnings is 1591, so it looks like:
#pragma warning disable 1591
Problem
I have a Visual Studio (C#) project in which the "XML documentation file" property is enabled. It also has "Treat warnings as errors" set to All. There is one particular class which has no XML comments and they will not be added to it. Since XML documentation and warnings as errors are enabled, this causes builds to fail. Is there a way to ignore this specific class when it comes to XML documentation?