473,388 Members | 873 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 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 38691
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: n_o_s_p_a__m | last post by:
someone please advise
3
by: marco_segurini | last post by:
Hi, I am using VS 2005. If I compile the following code only line 6 returns me an error while line 9 returns a warning. If I comment the line 6 and debug the program the assignments of lines...
10
by: Eric G. Harrison | last post by:
We have a project with many other projects referenced (all of which are referenced at the project level and are included in the solution). Frequenly, if we make a change in project A (such as adding...
37
by: jht5945 | last post by:
For example I wrote a function: function Func() { // do something } we can call it like: var obj = new Func(); // call it as a constructor or var result = Func(); // call it as...
1
by: rnot | last post by:
I encounter the following error mesagess (Linker errors I think cause it compiles well) whenever I try to define my classes in a global scope. I have four files: DataGrabber.h, Datagrabber.cpp,...
23
by: deathtospam | last post by:
A day or two ago, I wrote a quick ASPX page with a CS codebehind using Visual Studio .NET 2005 -- it worked, I saved it and closed the project. Today, I came back to the project, reopened the...
0
by: Dommett | last post by:
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...
4
by: liz0001 | last post by:
Hi, I am getting this error when I try to run my code: Missing semicolon (;) at end of SQL statement However, there is a semicolon at the end of my statement. Here is the statement: INSERT...
0
by: Ignacio Machin ( .NET/ C# MVP ) | last post by:
The difference between compile & runtime. CreateInstance works at runtime, you can pass ANY string to it (even an incorrect one like "123123123123") and it will compile Only at runtime you will...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.