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?


0
spam9705 (1)
5/17/2004 6:25:21 PM
dotnet.xml 7266 articles. 0 followers. Follow

3 Replies
1352 Views

Similar Articles

[PageSpeed] 0

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 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?
>
>
>.
>
0
vikasde (26)
5/18/2004 12:45:37 AM
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
0
Oleg
5/18/2004 9:29:50 AM
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
0
6/11/2004 1:27:27 PM
Reply:

Similar Artilces:

Suppress "Missing Xml Comment" on specific methods
I would like to suppress the warning on some methods (e.g. Dispose which doesn't really need a comment and also some private methods I just dont want to explain). What I'd like is a way to do the following: /// <Summary> /// Some text ... /// </Summary> public void SomeMethod () { // This method will get documented correctly } /// <NoComments /> public void SomeNonDocumentedMethod () { // This method will not appear in documentation } I hope it can be done. ...

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