This project is read-only.


Incorrect behavior of doc comment stub for property


In the 4/3 end user preview, the documentation comment automatically added when you type /// before a property is not correct.

Steps to reproduce

  1. Add the following property to a class.
    public int Foo { get { return 0; } }
  2. On the line before the property, type ///.

Expected behavior

The documentation comment added before the property should have the following form.
/// <summary>
/// </summary>
/// <value></value>

Actual behavior

The documentation comment added before the property has the following form.
/// <summary>
/// </summary>
/// <returns></returns>


JanKucera wrote May 29, 2014 at 4:15 PM

I can't confirm this issue.

In Visual Studio 2013 without Roslyn, the doc gets generated as
        /// <summary>
        /// </summary>
This corresponds to what is documented at
I believe that in previous versions it used to generate returns too, but I agree that at least according to the documentation value is more appropriate than returns. Anyway, I wouldn't want it to generate neither by default.

sharwell wrote May 29, 2014 at 7:51 PM

It would also be acceptable if the only inserted section was <summary>. The two points I was making are:
  1. <returns> is rarely, if ever, specified for a property. The generated comment should not include this element.
  2. <value> is generally specified for a well-documented property. If the generated comment includes anything in addition to the <summary> element, it should be a <value> element.

Pilchie wrote Jul 24, 2014 at 5:32 PM

We have updated the generation to match VS2013 - the only thing generated is the summary tag.