Missing XML comment for publicly visible type or member

前端 未结 16 2338
甜味超标
甜味超标 2020-11-30 17:16

I am getting this warning: \"Missing XML comment for publicly visible type or member\".

How to solve this?

16条回答
  •  时光说笑
    2020-11-30 17:39

    Suppress Warnings for XML comments

    (not my work, but I found it useful so I've included the article & link)

    http://bernhardelbl.wordpress.com/2009/02/23/suppress-warnings-for-xml-comments/

    Here i will show you, how you can suppress warnings for XML comments after a Visual Studio build.

    Background

    If you have checked the "XML documentation file" mark in the Visual Studio project settings, a XML file containing all XML comments is created. Additionally you will 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 stabilize our code, getting hundreds of XML comment warnings is just a pain.

    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 ‘…’ (but other parameters do)

    Solution

    You can suppress every warning in Visual Studio.

    • Right-click the Visual Studio project / Properties / Build Tab

    • Insert the following warning numbers in the "Suppress warnings": 1591,1572,1571,1573,1587,1570

提交回复
热议问题