Search code examples
c#xamarin.formsvisual-studio-2019intellisensexml-comments

VS2019 (16.8.1), C#, XML Comments, Intellisense not showing


I have a Xamarin Forms project (C#) that I am working on in VS2019 (16.8.1) and I have noticed that if I add XML comments to the properties of classes within the project they are not then showing up when I hover over that property in another class where it is used.

Not working:

/// <summary>
/// Property1 && Property2 && Property3 && Property4
/// </summary>
public Boolean IsTypeA
{
    get {
        return Property1 && Property2 && Property3 && Property4;
    }
}

This never used to be the case; any ideas what may have changed that I have missed in order to restore this functionality?


Solution

  • Turns out that the comments I had added were invalid XML.

    I was trying to show the meaning of some read-only helper properties by simply showing the code that was used to evaluate the result - this included ampersand characters...

    Fixed version of comment:

    /// <summary>
    /// Property1 &amp;&amp; Property2 &amp;&amp; Property3 &amp;&amp; Property4
    /// </summary>
    public Boolean IsTypeA
    {
        get {
            return Property1 && Property2 && Property3 && Property4;
        }
    }
    

    M.