472,126 Members | 1,425 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,126 software developers and data experts.

Suppress "Missing XML comment" warning during compile?

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
4 38322
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
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
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
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.

Similar topics

3 posts views Thread by n_o_s_p_a__m | last post: by
3 posts views Thread by marco_segurini | last post: by
10 posts views Thread by Eric G. Harrison | last post: by
reply views Thread by Ignacio Machin ( .NET/ C# MVP ) | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.