Include tag doesn't work in documentation comments


P

Philippe Bertrand

I tried following the pattern in MSDN and it just plain doesn't work.

I replaced the comments for a class with an include tag but did not change
any of the comments on the members of the class (without the include tag my
docs were building fine).
/// <include file='Command2.xml' path='MyDocs/MyMembers[@name="class"]/*'/>
public class MyClass : ...

with Command2.xml looking like:
<MyDocs>
<MyMembers name="class">
<summary>
My description.
</summary>
</MyMembers>
</MyDocs>

and I get
Command2.xml: error CS1592: Badly formed XML in included comments file --
'System error: -2146697210.

What is going on? I'm using Visual Studio .NET 2003.

Thanks,
Philippe
 
Ad

Advertisements

C

Chris R. Timmons

I tried following the pattern in MSDN and it just plain doesn't
work.

I replaced the comments for a class with an include tag but did
not change any of the comments on the members of the class
(without the include tag my docs were building fine).
/// <include file='Command2.xml'
path='MyDocs/MyMembers[@name="class"]/*'/>
public class MyClass : ...

with Command2.xml looking like:
<MyDocs>
<MyMembers name="class">
<summary>
My description.
</summary>
</MyMembers>
</MyDocs>

and I get
Command2.xml: error CS1592: Badly formed XML in included
comments file -- 'System error: -2146697210.

What is going on? I'm using Visual Studio .NET 2003.

Phillippe,

Is Command2.xml located in the same folder as your source code?
That's where I have my XML comment include files and it works OK for
me.
 
Ad

Advertisements

P

Philippe Bertrand

That was the trick. My build process pre-processes .cspp into .cs resulting
in the .cs being in another directory. I made it copy the included doc tag
file to the same directory as the .cs file and it work.

Thanks for the help
Philippe

Chris R. Timmons said:
I tried following the pattern in MSDN and it just plain doesn't
work.

I replaced the comments for a class with an include tag but did
not change any of the comments on the members of the class
(without the include tag my docs were building fine).
/// <include file='Command2.xml'
path='MyDocs/MyMembers[@name="class"]/*'/>
public class MyClass : ...

with Command2.xml looking like:
<MyDocs>
<MyMembers name="class">
<summary>
My description.
</summary>
</MyMembers>
</MyDocs>

and I get
Command2.xml: error CS1592: Badly formed XML in included
comments file -- 'System error: -2146697210.

What is going on? I'm using Visual Studio .NET 2003.

Phillippe,

Is Command2.xml located in the same folder as your source code?
That's where I have my XML comment include files and it works OK for
me.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top