I enabled XML documentation generation for my project.
<PropertyGroup>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>
This generates a lot of warnings for my project because I don't compulsively add or update the XML doc comments for each and every type or member in my project. I turned the warnings back off with another tactically placed MSBuild instruction.
<PropertyGroup>
<NoWarn>$(NoWarn);1591</NoWarn> <!-- CS1591: Missing XML comment for publicly visible type or member -->
<NoWarn>$(NoWarn);1573</NoWarn> <!-- CS1573: Parameter '' has no matching param tag in the XML comment -->
</PropertyGroup>
Now the question becomes, how do I restore the warnings for the files where I do want to have clean documentation or a warning?
What I tried, didn't work.
#pragma warning restore CS1591,CS1573
public class Undocumented
{
public void AlsoUndocumented(bool undocumented = true) { }
}