I'm working on Developing a Web-API project, and i'm very impressed with the auto generated documentation by Microsoft's HelpPages.
i enabled custom documentation using the official site creating Help Pages
the documentation is generated successfully BUT none of the references to Classes from the <See cref="">
Tag seems to be added to the description, the HelpPages Simply ignores them (that's for a reason).
i really wanted to have this feature in my project, i searched a lot (got close sometimes) but none gave a convincing answer.
That's why i decided to post my solution to this tweak and hopefully benefit other programmers and spare them some time and effort. (my answer is in the replies below)
I have implemented class which process xml documentation block and changes documentation tags to html tags.
To use it, you will need to change
XmlDocumentationProvider
class:And then I wrote extension class to use this class directly from view:
And finally, for example in Parameters.cshtml:
my solution is the following:
simply go to: ProjectName > Areas > HelpPage > XmlDocumentationProvider.cs
on line 123 in method: GetTagValue(XPathNavigator parentNode, string tagName)
change the code
return node.Value.Trim();
toreturn node.InnerXml;
ProjectName\Areas\HelpPage\Views\Help**_XML_SeeTagsRenderer.cshtml**
this is my code:
Finally Go to: ProjectName\Areas\HelpPage\Views\Help\DisplayTemplates**Parameters.cshtml**
at line '20' we have the code corresponding to the Description in the documentation.
REPLACE this:
With THIS:
& Voila you must have it working now.
Notes:
<see cref="MyClass">
and i worked fine<see cref>
will have it's full name printed in the description (for example if you reference a property or namespace, the code won't identify it as a type/class but it will be printed)