Improved XML documentation support in ReSharper and Rider

Having code with XML documentation is great, as it allows generating nice API documentation and provides useful help while writing code:

XML documentation class and parameter info

ReSharper 2017.2 and Rider 2017.2 EAP give us more tooling to organize XML documentation across inheritance hierarchies.

When creating a class library that provides XML documentation, we can make use of the <inheritdoc/> element to inherit documentation from a base class or an interface. Consider the following code:

/// <inheritdoc />
public class TenantAwareCustomerRepository
    : ITenantAware, IRepository<Customer>

Should documentation be inherited from ITenantAware or IRepository<T> in this case? If we leave our code like this, we’ll not get any documentation at all. We’ll have to specify which base class we want to inherit documentation from, using the cref attribute. A new inspection (and quick-fix) will help us provide proper API documentation to the users of our library. Note that ReSharper and Rider provide us with code completion for possible types to reference when we invoke Smart Completion (Ctrl+Alt+Space).
Invalid use of inheritdoc

Another code inspection will warn us when a derived class overrides documentation of its base class, and offers to add <inheritdoc/> to the XML documentation:
Suggest adding inheritdoc element

Download ReSharper Ultimate 2017.2 now or check out Rider 2017.2 EAP! We’d love to hear your thoughts.

Comments below can no longer be edited.

4 Responses to Improved XML documentation support in ReSharper and Rider

  1. Avatar

    GreenMoose says:

    September 6, 2017

    Worth noting is that using may cause issues down the road when it comes to XMLdoc generation, since it is not part of the CSharp language ( thus not supported by e.g. swashbuckle/swagger for doc generation (

  2. Avatar

    Aleksey says:

    September 6, 2017

    Thank you for great ide!
    btw about xml documentation: any chance to see resolution of this issue in near future?)

  3. Avatar

    LordJZ says:

    September 6, 2017

    And the first screenshot shows the god-awful R# tooltips. Seriously guys, it’s been 2 years. It should have been changed 2 weeks after VS 2015 preview. RSRP-447855

  4. Avatar

    Marco says:

    September 7, 2017

    @LordJZ: I haven’t seen those tooltips in a while, but I agree that they’re pretty lackluster. I include the “Enhanced Tooltip” extension, which addresses this issue quite nicely.

Discover more