VB.NET XML注释引擎中的BUG? [英] BUG in VB.NET XML comment engine?

查看:59
本文介绍了VB.NET XML注释引擎中的BUG?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在VS.NET 2003期间一直在VB.NET中使用XML注释

感谢VBXC和NDoc。我刚刚开始将我的一个项目升级到

VB.NET 2005,我看到一些奇怪的错误集中在我过去使用XML

评论。我很想知道你们是否认为这是一个bug或者按照设计工作

而且我很幸运能够逃脱它。


我有一个方法可以根据两个不同的情况抛出一个

ArgumentException。我用这种方式对它进行了评论:


'''''< summary>

''''''允许调用者获取名称一个向导形式及其索引

数。

'''''< / summary>

''''''' < param name =" pageNumber">整数值,表示向导页面为

reference。< / param>

''''''< returns> ;引用页面上引用的

索引的名称字符串。< / returns>

''''''< exception cref =" ArgumentException"> ;如果pageNumber小于零,将被抛出。< / exception>

''''''< exception cref =" ArgumentException">如果pageNumber比集合中包含的页面数大
,则会抛出。< / exception>


VS.NET 2005现在抱怨以下内容:


XML注释标签'例外出现具有相同属性不止一次

在同一个XML注释块。 XML注释将被忽略。


对我来说这是XML注释引擎中的一个错误。 NDoc创建一个表格

,显示你可以获得的每个异常以及它将被抛出的原因。
这个表允许(显然就像NDoc模式一样)

相同类型但不同的原因。

这里有人关心他们的想法吗?我没有在C#中试过相同的

的东西,所以我不确定它是否会以不同的方式工作。


-

Raymond R Cassick

CEO / CSA

Enterprocity Inc.
www.enterprocity.com

3380 Sheridan Drive,#143

Amherst,NY 14227

V:716-316-5973

博客: http ://spaces.msn.com/members/rcassick/

I have been using XML Comments in VB.NET during my time with VS.NET 2003
thanks to VBXC and NDoc. I just started to upgrade one of my projects into
VB.NET 2005 and am seeing some odd errors centered around my past use of XML
comments. I am interested to know if you all think this is a bug or ''working
as designed'' and I was just lucky to get away with it.

I had a method that could, based upon two different cases throw an
ArgumentException. I had commented it this way:

'''''' <summary>
'''''' Allows the caller to get the name of a wizard form with its index
number.
'''''' </summary>
'''''' <param name="pageNumber">Integer value indicating the wizard page to
reference.</param>
'''''' <returns>The name string of the wizard page at the referenced
index.</returns>
'''''' <exception cref="ArgumentException">Will be thrown if the pageNumber is
less than zero.</exception>
'''''' <exception cref="ArgumentException">Will be thrown if the pageNumber is
greater than the number of pages contained in the collection.</exception>

VS.NET 2005 now complains of the following:

XML comment tag ''exception'' appears with identical attributes more than once
in the same XML comment block. XML comment will be ignored.

Seems to me this is a bug in the XML comments engine. NDoc creates a table
showing each exception you can get and the reason why it would be thrown.
This table allows (as does the NDoc schema apparently) for exceptions of the
same type but different reasons.

Anyone here care to comment on their thoughts? I have not tried the same
thing in C# so I am not sure if it would work differently there or not.

--
Raymond R Cassick
CEO / CSA
Enterprocity Inc.
www.enterprocity.com
3380 Sheridan Drive, #143
Amherst, NY 14227
V: 716-316-5973
Blog: http://spaces.msn.com/members/rcassick/

推荐答案

Ray,


Ray Cassick(Home)" < RC ************ @ enterprocity.com> schrieb:
Ray,

"Ray Cassick (Home)" <rc************@enterprocity.com> schrieb:
由于VBXC和NDoc,我在使用VS.NET 2003期间一直在VB.NET中使用XML注释。我刚刚开始将我的一个项目升级到VB.NET 2005,并且看到一些奇怪的错误集中在我过去使用的XML评论上。我很想知道你们是否认为这是一个错误或者按照设计工作而且我很幸运能够逃脱它。

我有一个方法可以,基于两种不同的情况抛出一个
ArgumentException。我用这种方式对它进行了评论:

'''''< summary>
'''''''允许调用者获取其索引的向导表单的名称<数字。
''''''< / summary>
''''''< param name =" pageNumber">整数值表示向导页面为
reference。< / param>
''''''< returns>引用页面上引用的
索引的名称字符串。< / returns>
'' ''''< exception cref =" ArgumentException">如果pageNumber
小于零,则会抛出。< / exception>
'''''< exception cref = ArgumentException>如果pageNumber
大于
集合中包含的页数,则抛出。< / exception>

VS.NET 2005现在抱怨以下内容:

XML注释标记''exception''出现的属性与
相同一次在同一个XML注释块中。 XML注释将被忽略。


我已经在VB 2005和VC#2005中检查了它。似乎你所描述的问题

在VC#2005中不存在。我'我将调查并回来



这里有人关心他们的想法吗?我没有在C#中尝试相同的东西,所以我不确定它是否会以不同的方式工作。
I have been using XML Comments in VB.NET during my time with VS.NET 2003
thanks to VBXC and NDoc. I just started to upgrade one of my projects into
VB.NET 2005 and am seeing some odd errors centered around my past use of
XML comments. I am interested to know if you all think this is a bug or
''working as designed'' and I was just lucky to get away with it.

I had a method that could, based upon two different cases throw an
ArgumentException. I had commented it this way:

'''''' <summary>
'''''' Allows the caller to get the name of a wizard form with its index
number.
'''''' </summary>
'''''' <param name="pageNumber">Integer value indicating the wizard page to
reference.</param>
'''''' <returns>The name string of the wizard page at the referenced
index.</returns>
'''''' <exception cref="ArgumentException">Will be thrown if the pageNumber
is less than zero.</exception>
'''''' <exception cref="ArgumentException">Will be thrown if the pageNumber
is greater than the number of pages contained in the
collection.</exception>

VS.NET 2005 now complains of the following:

XML comment tag ''exception'' appears with identical attributes more than
once in the same XML comment block. XML comment will be ignored.
I have checked it in both, VB 2005 and VC# 2005. It seems that the problem
you describe does not exist in VC# 2005. I''ll investigate and get back
later.
Anyone here care to comment on their thoughts? I have not tried the same
thing in C# so I am not sure if it would work differently there or not.




在VC#2005中,至少在8月的CTP中,它确实有效。但是,AFAIS

VB 2005中用于XML注释的IntelliSense比VC#2005好多了?b $ b :-)。


-

MS Herfried K. Wagner

MVP< URL:http://dotnet.mvps.org/>

VB< ;网址:http://classicvb.org/petition/>



In VC# 2005, at least in the August CTP, it actually works. However, AFAIS
IntelliSense for XML comments in VB 2005 is much better than in VC# 2005
:-).

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>


非常感谢。


我现在通过简单地使用

异常描述中的列表来解决它,但我真的不喜欢这个。当生成

文档时,它的鼻子看起来很干净。人们倾向于更多地看待粗体异常而不是描述中的各个元素。


让我知道你发现了什么。


" Herfried K. Wagner [MVP]" <喜*************** @ gmx.at>在留言中写道

news:ue ************* @ TK2MSFTNGP09.phx.gbl ...
Thanks very much.

I am getting around it now by simple using a list in the description of the
exception but I really don''t like this. It doe snot look as clean when the
docs are generated. People tend to look more at the bolded exceptions than
the individual elements of the descriptions.

Let me know what you find.

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:ue*************@TK2MSFTNGP09.phx.gbl...
Ray,

雷卡西克(家庭) < RC ************ @ enterprocity.com> schrieb:
Ray,

"Ray Cassick (Home)" <rc************@enterprocity.com> schrieb:
由于VBXC和NDoc,我在使用VS.NET 2003期间一直在VB.NET中使用XML注释。我刚刚开始将我的一个项目升级到VB.NET 2005,并且看到一些奇怪的错误集中在我过去使用的XML评论上。我很想知道你们是否认为这是一个错误或者按照设计工作而且我很幸运能够逃脱它。

我有一个方法可以,基于两种不同的情况抛出一个
ArgumentException。我用这种方式对它进行了评论:

'''''< summary>
'''''''允许调用者获取其索引的向导表单的名称<数字。
''''''< / summary>
''''''< param name =" pageNumber">整数值表示向导页面为
reference。< / param>
''''''< returns>引用页面上引用的
索引的名称字符串。< / returns>
'' ''''< exception cref =" ArgumentException">如果pageNumber
小于零,则会抛出。< / exception>
'''''< exception cref = ArgumentException>如果pageNumber
大于
集合中包含的页数,则抛出。< / exception>

VS.NET 2005现在抱怨以下内容:

XML注释标记''exception''出现的属性与
相同一次在同一个XML注释块中。 XML注释将被忽略。
I have been using XML Comments in VB.NET during my time with VS.NET 2003
thanks to VBXC and NDoc. I just started to upgrade one of my projects into
VB.NET 2005 and am seeing some odd errors centered around my past use of
XML comments. I am interested to know if you all think this is a bug or
''working as designed'' and I was just lucky to get away with it.

I had a method that could, based upon two different cases throw an
ArgumentException. I had commented it this way:

'''''' <summary>
'''''' Allows the caller to get the name of a wizard form with its index
number.
'''''' </summary>
'''''' <param name="pageNumber">Integer value indicating the wizard page to
reference.</param>
'''''' <returns>The name string of the wizard page at the referenced
index.</returns>
'''''' <exception cref="ArgumentException">Will be thrown if the pageNumber
is less than zero.</exception>
'''''' <exception cref="ArgumentException">Will be thrown if the pageNumber
is greater than the number of pages contained in the
collection.</exception>

VS.NET 2005 now complains of the following:

XML comment tag ''exception'' appears with identical attributes more than
once in the same XML comment block. XML comment will be ignored.



我已经在VB 2005和VC#2005中检查了它。似乎你描述的问题在VC#2005中不存在我会调查并稍后回来。



I have checked it in both, VB 2005 and VC# 2005. It seems that the
problem you describe does not exist in VC# 2005. I''ll investigate and get
back later.

这里有人关心他们的想法吗?我没有在C#中尝试相同的东西,所以我不确定它是否会以不同的方式工作。
Anyone here care to comment on their thoughts? I have not tried the same
thing in C# so I am not sure if it would work differently there or not.



在VC#2005中,至少在8月的CTP中,它确实有效。但是,在VB 2005中用于XML评论的AFAIS IntelliSense比在VC中好多了#
2005 :-)。

-
MS Herfried K. Wagner
MVP< URL:http://dotnet.mvps.org/>
VB< URL:http://classicvb.org/petition/>



In VC# 2005, at least in the August CTP, it actually works. However,
AFAIS IntelliSense for XML comments in VB 2005 is much better than in VC#
2005 :-).

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>



" Ray Cassick(Home)" < RC ************ @ enterprocity.com> schrieb:
"Ray Cassick (Home)" <rc************@enterprocity.com> schrieb:
我现在通过简单地使用
异常描述中的列表来解决它,但我真的不喜欢这个。当生成文档时,它会让人看起来很干净。人们倾向于更多地看待粗体异常
而不是描述中的各个元素。
I am getting around it now by simple using a list in the description of
the exception but I really don''t like this. It doe snot look as clean when
the docs are generated. People tend to look more at the bolded exceptions
than the individual elements of the descriptions.




我个人更喜欢每个异常类型一个条目,以及一个列表

的原因描述中的这个例外(参见''list''XML注释元素)。


-

MS Herfried K. Wagner

MVP< URL:http://dotnet.mvps.org/>

VB< URL:http://classicvb.org/请愿/>



Personally I prefer one entry per exception type, and a list of reasons for
this exception in the description (see ''list'' XML comment element).

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>


这篇关于VB.NET XML注释引擎中的BUG?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆