Search code examples
.netnamespacesassembliessandcastlexml-comments

XML Comments -- How (or where) do you create XML comments for your namespaces and library?


I understand that if you /// above a class, field, method, or property Visual Studio will start establishing XML-style comments for you.

However, where can I go to add XML comments for my namespaces and/or library...

For example:

I'm not sure if those pages were manually created or if they were automatically created via XML-style comments being added in the proper locations?


Solution

  • That depends on the tool you use to generate your documentation. With NDoc, I believe, you simply had to create a class called NamespaceDoc inside the namespace you wanted to document. The XML-Comment of that class would have then be used.

    Since the question is tagged with "sandcastle", I assume you are indeed using it. If so, this SO answer should give the details.

    Update: OK, I just (in that same thread) saw that apparently Sandcastle understands NamespaceDoc-classes as well. Somebody might want to close this question as a duplicate.