Monday, November 5, 2012

Suppress Warnings in XML comments (Visual Studio)

If we've checked the "XML documentation file" mark in the Visual Studio project settings, a XML file containing all XML comments is created. Additionally we'll get a lot of warnings also in designer generated files, because of the missing or wrong XML comments. While sometimes warnings helps us to improve and optimize our code but not the case all times.

Warnings

Missing XML comment for publicly visible type or member --- XML comment on --- has a param tag for "---", but there is no parameter by that name Parameter "---" has no matching param tag in the XML comment for "---"

Solution

We can suppress every warning in Visual Studio.
- In Visual Studio Right-click the the specific project / Properties / Build Tab
- Insert the following warning numbers in the "Suppress warnings": 1591,1572,1571,1573,1587,1570

No comments:

Post a Comment