Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio XML external comments file does not work

By using include tag I am trying to put comments for my code in separate file "docs.xml". But it does not work. I have been trying both C# and VB.NET projects.

Here is my comments file:

<?xml version="1.0" encoding="utf-8" ?>
<d>
<summary>Demo summary</summary>
</d>

I have a class ABC with one single property Demo. before this property I write:

/// <include file="docs.xml" path="d/*" />

or in VB.NET:

''' <include file="docs.xml" path="d/*" />

However summary for ABC.Demo never appears in InteliSense / Object browser / another project (if I reference my project).

I have a strong feeling I am missing something here.

P.S. I have tried following "path[@name=]" pattern of XML file, but it does not help.

like image 418
Dima Avatar asked Nov 11 '22 17:11

Dima


1 Answers

Perhaps you already saw this in the documentation then, but if I understand correctly, you have to do the following:

In Visual Studio, you specify the XML doc comments option in the Build pane of the Project Designer. When the C# compiler sees the tag, it will search for documentation comments in xml_include_tag.doc instead of the current source file.

like image 130
Chris Leyva Avatar answered Nov 14 '22 22:11

Chris Leyva