19

When typing multi-line comments Visual studio used to add an automatic asterisk to each new line of the comment as I press enter(apparently 2015 does not do this anymore). I really liked this. As of right now though, if I type "/*" and enter, Visual studio does not try to autocomplete it at all. In fact, it even lets me end the comment with "*/", too, instead of doing it for me. So my question is: is anyone else experiencing this? How do I get the original functionality back, so each new line is automatically prefixed with an asterisk, and closed for me by "*/"?

I already checked and yes, my environment settings are set to C# and yes the option "Generate XML documentation comments for ///" is indeed checked in my settings.

10
  • 3
    Funny. I never liked that behavior with the comments. I'm glad you pointed out this change. I like it better this way. :)
    – sstan
    Commented Aug 22, 2015 at 0:42
  • 2
    @sstan I don't; it bothers the crap out of me.
    – Krythic
    Commented Aug 22, 2015 at 0:42
  • Relevant: visualstudio.uservoice.com/forums/121579-visual-studio/…. I wonder if this caused the change...
    – sstan
    Commented Aug 22, 2015 at 0:50
  • @sstan I agree with the poster of that in one regard: it should be optional.
    – Krythic
    Commented Aug 22, 2015 at 0:51
  • 5
    The C# Coding Conventions from MSDN state "Do not create formatted blocks of asterisks around comments.". Maybe that's their way to enforce that a little? - msdn.microsoft.com/en-us/library/ff926074.aspx
    – PhilMasteG
    Commented Aug 22, 2015 at 14:26

2 Answers 2

17
+100

This is a well-known problem, the feature fell by the way-side in the Roslyn refactoring of the C# Editor Features. Nothing to do with config or a change of preferences, it simply was not implemented.

It is currently being tracked by this Github issue. Status is "Up for grabs" right now with nobody having shown an interest in grabbing it yet as of today. Afaict, best to not hold your breath for it, I think they have several bigger fires to put out. It will surely be delivered in an update sooner or later.

6
  • I upvoted you, but this is more informational, rather than an answer on how to get the feature back.
    – Krythic
    Commented Aug 24, 2015 at 19:01
  • 7
    Patience grasshopper, I'll first have to talk to wife into moving to rainy Redmond, then apply for a job at Microsoft, then implement the feature. 6 to 8 weeks. Commented Aug 26, 2015 at 23:55
  • 2
    No need to be sarcastic.
    – Krythic
    Commented Aug 27, 2015 at 9:21
  • I agree, that characterization of my post was quite unnecessary. Just DV posts you don't like. Commented Aug 27, 2015 at 11:40
  • This is confusing to me because Roslyn is the new compiler but Visual Studio is the IDE. I believe your answer, but I don't understand how this is the case.
    – Sam Rueby
    Commented Oct 6, 2015 at 16:03
0

Just wanted to update and say that this problem was apparently fixed(sort of) in one of the newer updates of Visual Studio. The editor still does not complete the comment for you, but it does at least keep the formatting consistent, and adds an asterisk to the next line for you.

Not the answer you're looking for? Browse other questions tagged or ask your own question.