Search code examples
c#sandcastlexml-documentationxml-comments

Sandcastle not generating params or return


I have a Visual Studio C# project with XML documentation comments. I get a .xml file with <summary>, <param>, <returns> and <example> members.

The text I put inbetween the <summary> tags is shown in the help file as well as Namespace, Assembly, Example and See Also sections. Just <param> and <returns> don't even have an empty section even though it builds with no errors.

Relevant part of the generated .xml:

<member name="M:OPC_ClientLib.OPC_Client.getBit(System.String)">
    <summary> the summary text (is shown) </summary>
    <param name="variable">Variable name (not shown)</param>
    <returns>true or false, (not shown)</returns>
    <example>
        <code> bool bit = getBit("bitname")</code>
    </example>
</member>

Actual output

enter image description here


I use Sandcastle Help File Builder GUI Version 2018.5.29.0.

I tried to show anything in the project properties which gave me a lot of unwanted extra elements in the documentation but none of which got me <return> or <params>.


Solution

  • For some reason if I make a Sandcastle Project in Visual Studio the Problem is resolved and i also get a Syntax section which is quite nice. I still don't understand why this isn't working in the Sandcastle GUI but this works for me. Thanks for your help

    Edit: actually I just found the real Problem. When I included the Project I thought I had to change the target Framework from 4.5 to 4.6.1 like it is in my C# Project. Changing it back oddly does not resolve the issue but making a new Project without changing that property does. Just in case someone has the same issue.