Newbie
Newbie

Reputation: 41

XML Comments stored inside external file is not showed by Intellisense

I followed this MSDN guide for commenting my code.

I discovered i can use external files to achieve the same result in a more clean way.

However, my IntelliSense don't show those comments on Visual Studio (in this case the file is stored in the root of the application, same level of the .sln file). screen here

I followed this steps to assure it's not a faulty project:

  1. I created a new .NET Class Library
  2. I created a new file on the project called docs.xml (like the guide)
  3. I've put this code inside this new file:

    <docs> <members name="class1"> <Class1> <summary> This is a test description </summary> </Class1> </members> </docs>

  4. I've enabled the "XML documentation file" inside the project settings and left the default value (bin\ClassLibrary1.xml)

  5. I inserted the xml above my class declaration:
    /// <include file='docs.xml' path='docs/members[@name="class1"]/Class1/*' public class Class1 { }
  6. Built the solution
  7. However there is no summary specified.

In the compiled bin xml file the summary specified in this file is present and using tools like SandCastle shows the documentation correctly.

Am I doing something wrong or this is the default behaviour? I searched around the net (especially here) and haven't found a proper solution at the problem.

Upvotes: 4

Views: 316

Answers (1)

Imantas
Imantas

Reputation: 1662

https://visualstudio.uservoice.com/forums/121579-visual-studio-2015/suggestions/12389910-include-external-xml-documentation-in-intellisense

Given the official answer to user suggestion, it sounds like Visual Studio simply doesn't have such feature as of Visual Studio 2017.

Upvotes: 1

Related Questions