Search code examples
c#documentationdocumentation-generationsandcastle

How to mark obsolete classes/methods in the output with sandcastle


I'm building an API documentation with Sandcastle. The code has multiple classes and methods which are marked deprecated. Now I want that in the API-documentation output these methods are clearly marked (crossed-out or other marker). However the Sandcastle output doesn't mark obsolete methods/classes at all.

My question is. What do I need to do to have the obsolete methods/classes marked by Sandcastle.

Thanks for any advice/help.


Solution

  • Well I found the issue. The issue is a mix of the API and Attribute filters I had in place.

    So I added the System-namespace to my API filters, so that it includes the Obsolete-Attribute:

    <apiFilter>
      <namespace name="System" expose="true">
        <type name="ObsoleteAttribute" expose="true" />
        <type name="SerializableAttribute" expose="false" />
      </namespace>
      <!-- rest of the stuff -->
    </apiFilter>
    

    And added it also to the list of Attribute-Filters:

    <attributeFilter expose="true">
      <namespace name="System" expose="false">
        <type name="ObsoleteAttribute" expose="true" />
      </namespace>
      <!-- rest of the stuff -->
    </attributeFilter>
    

    I had the 'ObsoleteAttribute' in my attribute-filter, but not in the API-filter.

    This thread was also helpful: http://docproject.codeplex.com/discussions/74716?ProjectName=docproject