Reputation: 21
I have a little problem I don't understand.
I wanna document my Code using Documentation comments. And I have a XML file with information about the author who wrote the part of code.
I'm using Visual Studio 2013 and have in the Project a directory named Documentation
there is the file Author.xml
with this structure:
<doc>
<member name="number1">
<remarks>some Information</remarks>
</member>
<member name="number2">
<remarks>some Information</remarks>
</member>
...
</doc>
In my code I have this comment
/// <summary>
///
/// </summary>
/// <include file='~/Documentation/Author.xml'path='doc/member[@name="number1"]/*'/>
public class ExampleClass { ... }
but in the documentation.xml is generated:
<summary>
</summary>
<!-- Der enthaltene XML-Abschnitt konnte nur teilweise oder gar nicht eingefügt werden. --><include file="~/Documentation/Author.xml" path="doc/member[@name="number1"]/*"/>
that means the XML-Code couldn't be included.
I have this from a book about C# for beginners, but it doesn't work.
Please can someone help me with my problem.
Upvotes: 2
Views: 669
Reputation: 109210
<include file='~/Documentation/Author.xml'path='doc/member[@name="number1"]/*'/
I can see two problems with that:
~
does not have any special meaning in Windows paths: you would be better using a path relative to the project.
You need a space between one attribute and another: change …xml'path=…
to …xml' path=…
.
Upvotes: 4