inheritdoc Tag Nested In Html Tag

Topics: Developer Forum, User Forum
May 19, 2009 at 2:29 AM

I'd like to use the <inheritdoc/> tag within an Html tag, in particular a <div> tag.  However, the following sample does not work.


public class Test
   /// <summary>
   /// <div style="background-color: blue;">
   /// Some text that is not inherited.
   /// <br/>
   /// <inheritdoc cref="Object.ToString"/>
   /// </div>
   /// </summary>
   public string TestMethod()
      return String.Empty;

Any ideas on how to get this to work?

May 19, 2009 at 7:10 PM

It should work.  I tried your example and the GenerateInheritDocs tool crashed with an exception.  Is that what you get?  I'll fix the bug that causes the crash and will check it out to make sure that it does work once that's fixed.



May 19, 2009 at 7:12 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
May 19, 2009 at 8:34 PM
Edited May 19, 2009 at 8:35 PM

Yes.  Thanks, Eric.

A snippet from the log file looks like this:


Reflection information will be retrieved from ''
Inherited documentation will be written to '_InheritedDocs_.xml'
Indexing C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\\*.xml
Indexing C:\Projects\WebServices\Help\Working\WebServices.xml
Indexed 75978 members in 66 file(s). 1 file(s) to scan for tags.
Merging inherited documentation...

SHFB: Error GID0001: Unexpected error while generating inherited documentation:
System.ArgumentException: The node to be removed is not a child of this node.
at System.Xml.XmlNode.RemoveChild(XmlNode oldChild)
at System.Xml.XmlNode.ReplaceChild(XmlNode newChild, XmlNode oldChild)
at InheritedDocumentation.GenerateInheritedDocs.InheritNestedDocumentation(XmlNode member)
at InheritedDocumentation.GenerateInheritedDocs.InheritDocumentation(XmlNode member)
at InheritedDocumentation.GenerateInheritedDocs.ScanCommentsFiles()
at InheritedDocumentation.GenerateInheritedDocs.Main(String[] args)

May 25, 2009 at 6:34 PM

The issue has been fixed and will be in the next release due out soon.  However, note that a "select" attribute will be required on the <inheritdoc> tag in the example that specifies a rooted query that selects the comments to import.  This is required as the standard behavior is to build a query based on the tags in which it is embedded.  Since you've embedded it in a <div> which is not in the inherited docs, you'll need to explicitly define what comments to import.  For example:

<inheritdoc cref="Object.ToString" select="/summary/node()" />.