VS2008: Autogenerated files and XML documentation
This is an annoyance more than a problem. My project contains a number of autogenerated files (using mgmtclassgen.exe). When I generate the XML documentation, my beautifully commented library is plagued by xml documentation warnings from these autogen files.
Is there a way to either a) suppress generating documentation for these files or b) suppress warning CS1591 just for a set of files? I obviously do not want to modify files that are autogenerated, even if to just add suppression pragmas.
The library and generated code are both in C# and I'm using Visual Studio 2008.
You can disable specific warnings using the #pragma directive, this might suit your purpose. The syntax for disabling the 'missing xml comment' warning is:
#pragma warning disable 1591 // Disable 'missing xml comment' warning
You can re-enable it using the following syntax:
#pragma warning restore 1591 // Restore 'missing xml comment' warning
This allows you to selectively ignore warnings for either part of a file or a complete file.