{"id":17,"date":"2009-08-25T12:57:52","date_gmt":"2009-08-25T18:57:52","guid":{"rendered":"http:\/\/todesco-technologies.com\/unboxed\/?p=10"},"modified":"2009-08-25T12:57:52","modified_gmt":"2009-08-25T18:57:52","slug":"ignore-missing-xml-comments","status":"publish","type":"post","link":"https:\/\/todescotechnologies.com\/unboxed\/index.php\/2009\/08\/25\/ignore-missing-xml-comments\/","title":{"rendered":"Ignore missing XML comments"},"content":{"rendered":"<p>When Visual Studio is set to generate XML comment files it will print out warnings for each public member that has no comment. Sometimes you want to ignore some of the warnings (say you have a bunch of pretty much self explaining enum entries. Even worse: you have some generator that creates code without comments) What I have seen many times is that someone decides it&#8217;s not worth fixing 100 warnings and disables the creation of XML comment files for the whole project. <\/p>\n<p>You don&#8217;t have to do that: Simply use a #Pragma statement to tell the compiler to stop issue warning for a certain Type:<\/p>\n<p>#pragma warning disable 1591<\/p>\n<p>When the section finishes and the warnings should be produced again use the following:<\/p>\n<p>#pragma warning restore 1591<\/p>\n<p>Of course you can do this with any other warning. The example uses the warning CS1591 (Missing XML comment for publicly visible type or member) but you can apply this to any warning, just ignore the CS prefix.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When Visual Studio is set to generate XML comment files it will print out warnings for each public member that has no comment. Sometimes you want to ignore some of the warnings (say you have a bunch of pretty much self explaining enum entries. Even worse: you have some generator that creates code without comments) &hellip; <a href=\"https:\/\/todescotechnologies.com\/unboxed\/index.php\/2009\/08\/25\/ignore-missing-xml-comments\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Ignore missing XML comments<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-17","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/todescotechnologies.com\/unboxed\/index.php\/wp-json\/wp\/v2\/posts\/17","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/todescotechnologies.com\/unboxed\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/todescotechnologies.com\/unboxed\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/todescotechnologies.com\/unboxed\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/todescotechnologies.com\/unboxed\/index.php\/wp-json\/wp\/v2\/comments?post=17"}],"version-history":[{"count":0,"href":"https:\/\/todescotechnologies.com\/unboxed\/index.php\/wp-json\/wp\/v2\/posts\/17\/revisions"}],"wp:attachment":[{"href":"https:\/\/todescotechnologies.com\/unboxed\/index.php\/wp-json\/wp\/v2\/media?parent=17"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/todescotechnologies.com\/unboxed\/index.php\/wp-json\/wp\/v2\/categories?post=17"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/todescotechnologies.com\/unboxed\/index.php\/wp-json\/wp\/v2\/tags?post=17"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}