Search code examples
c#sandcastle

Why are my code blocks not rendering in the Sandcastle Help File?


I'm using the current version of Sandcastle from Codeplex that is integrated with VS.NET 2012 to build a .cmh help file. The help file is being created, but I can't seem to ever get any of my <code> blocks to emit in the help file. I have the following easy example I keep working with:

/// <summary>
/// This is the summary 
/// </summary>
/// <code>var s;</code>
public string SomeValue { get; set; }

When I look at the output .chm file, the var s; code is not present anywhere. I have done the following:

The example is obviously a simplified version, but I'm just trying to get the basics work here. What am I doing incorrectly or missing?


Solution

  • I don't think the code tag is allowed to be by itself, try putting it inside an <example> tag, like <example><code>var s;</code></example>. So this should work:

    /// <summary>
    /// This is the summary 
    /// </summary>
    /// <example>
    /// <code>var s;</code>
    /// </example>
    public string SomeValue { get; set; }