Adding XML documentation for Razor components

Viewed 242

Is there a way of adding XML documentation for Razor components? I've noticed that some of Microsoft's components have documentation that shows up in IntelliSense:

enter image description here

However, adding the usual XML documentation to the code-behind partial class doesn't seem to work:

/// <summary>
/// This is my component.
/// </summary>
public partial class MyComponent : ComponentBase
{
    // ...
}

Is there another way of achieving this, or is it unsupported?

1 Answers

adding the usual XML documentation to the code-behind partial class doesn't seem to work

It works for me. But when I did a little test just now I noticed that there is a sort of delay at work here.

Adding a ///summary and doing a Rebuild did, at first, nothing. But after making a small actual change to the Component the text did show up in Intellisense.

I'm not entirely sure how this refresh works but just hang on, it will show up eventually.

Related