By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,742 Members | 1,570 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,742 IT Pros & Developers. It's quick & easy.

Suppress "Missing XML comment" warning during compile?

P: n/a
I use XML comments around most of my class libraries public property and
methods, for example:

/// <summary>
/// blah blah
/// </summary>

However I have a few dozen public constants as well as a few properties and
methods that I do not want to provide any XML comments for. This generates
errors like this:
page3.cs(43,25): warning CS1591: Missing XML comment for publicly visible
type or member 'test.testclass.constants.CONST_RECNOW'

Is there a way I can have the .NET complier (C#) suppress these warnings?
Ideally I'd like to indicate somehow in the source that these various items
do not have an xml comment so that if I write new properties it reminds me
if they are missing. Kinda like saying to the compiler 'yea I know these
don't have xml comments but that's ok' for items I choose. If not maybe I
can just turn off this particular warning altogether?
Nov 12 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
I am not sure whether this will work but to disable a
warning try this:

#pragma warning disable CS1591

Sonu
http://weblogs.asp.net/sonukapoor/

-----Original Message-----
I use XML comments around most of my class libraries public property andmethods, for example:

/// <summary>
/// blah blah
/// </summary>

However I have a few dozen public constants as well as a few properties andmethods that I do not want to provide any XML comments for. This generateserrors like this:
page3.cs(43,25): warning CS1591: Missing XML comment for publicly visibletype or member 'test.testclass.constants.CONST_RECNOW'

Is there a way I can have the .NET complier (C#) suppress these warnings?Ideally I'd like to indicate somehow in the source that these various itemsdo not have an xml comment so that if I write new properties it reminds meif they are missing. Kinda like saying to the compiler 'yea I know thesedon't have xml comments but that's ok' for items I choose. If not maybe Ican just turn off this particular warning altogether?
.

Nov 12 '05 #2

P: n/a
Sonu Kapoor wrote:
I am not sure whether this will work but to disable a
warning try this:

#pragma warning disable CS1591


That's only in C# 2.0 :)

--
Oleg Tkachenko [XML MVP]
http://blog.tkachenko.com
Nov 12 '05 #3

P: n/a
In case you haven't bottomed this one out, I was encountering the same
problem which was bugging me no end.

The fix is to add the specific warnings to the Supress Specific
Warnings field in the project properties. eg: I use

1591,1592,1573,1571,1570,1572

which supresses all XML errors, but you can pick and choose from that
list by searching for CSxxxx in the help to see what each one is

Cheers
Trev
Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com
Nov 12 '05 #4

P: n/a
In case you haven't bottomed this one out, I was encountering the same
problem which was bugging me no end.

The fix is to add the specific warnings to the Supress Specific
Warnings field in the project properties. eg: I use

1591,1592,1573,1571,1570,1572

which supresses all XML errors, but you can pick and choose from that
list by searching for CSxxxx in the help to see what each one is

Cheers
Trev
Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com
Nov 12 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.