I have turned on “Treat warnings as errors” for my VS project which mean that I get errors for missing documentation (nice reminder for this particular project).
However, part of the code is generated by a custom tool which does not insert xml documentation so I’m looking for away to ignore the missing xml documentation for the generated code only, not for the entire project. I have no influence on the actual file generated and cannot really insert anything in the file (as it is regenerated frequently by the tool) so I looking for something existing outside the generated file (the classes that are generated are partial, if that helps)
EDIT: See comments indicating that this doesn’t work with C# 4. I’m not clear whether it worked in earlier versions of the compiler. The C# 4 spec makes this pretty clear though. Section 2.5.8.1 states:
Jeff has a workaround in a blog post – basically to reprocess autogenerated code as part of the build.
As Tom says, you can add an “ignore” to the whole project (Build / Suppress Warnings – enter 1591 as the warning number) – but then you can restore the warning yourself at the top of each of your non-generated files:
It’s pretty ugly, but it works (I’ve just tested it).