This project has moved and is read-only. For the latest updates, please go here.

<example><code> displays no code when there is <returns> node

Topics: User Forum
May 24, 2010 at 6:16 PM

I'm finally producing Sandcastle documentation using the Help File Builder GUI, but have a problem.  I'm trying to include code blocks in the documentation.

When the XML comments look like this:

<summary>...</summary><example><code>Some code Here</code></example> everything works as it should - my code sample shows up in the .CHM file.

But if there is also a <returns>Some Text Here</returns> my code does not show up in the .CHM and I get the red "... missing returns ..." message in the .CHM.  I have moved the nodes around to reorder them but nothing seems to help.  What am I missing?



May 24, 2010 at 11:09 PM

As long as the <returns> element is outside the <example> element (i.e. at the same level as the <summary> element) it should be fine.  I'm not aware of any issues with it.  Do you have an example that doesn't work?



May 25, 2010 at 2:34 PM


I found it.  I only tried it for 3 code blocks.  By coincidence all three of them had an unescaped illegal character in the <example><code>Some code here.</code></example> section.  Because of my VS settings at the time I was not seeing the warning message about the unescaped characters.  Once I escaped the "<"'s characters everything shows up as expected.

Sorry to have bothered you.