3

When collapsing the XML comments for methods etc. It used to be that the summary was hidden. As I would like it to be. Then in VS2015 they broke this. I asked a similar question about VS2015 and got a nice workaround here - to use <para>.

The workaround continued working in VS2017 until now. Now I updated to version 15.5.1 and the workaround is broken, (why??...) and I can't find a setting to change that.

Is there one somewhere?

ispiro
  • 26,556
  • 38
  • 136
  • 291

2 Answers2

8

The way XML comments clutter up the code has always bothered me. In the past I've tried a few different Visual Studio Extensions and they've always sucked.

However, I just installed NoComment and it seems to do the job. I'm running Visual Studio 2017 version 15.7.3.

While I was looking for this I came across your question, so I thought I'd provide an answer. Hopefully you'll find it helpful :)

craftworkgames
  • 9,437
  • 4
  • 41
  • 52
-1

Since NoComment is no longer supported. I found Collapse Comments is the closest extension.

It works perfectly on Visual Studio 2019. It does a similar act of hiding xml comments. With options to hide small (single-line), long (multi-lines), and documentation (xml) comments.

Choose what you want to hide in the toolbar that you will see after installing the extension.

Toolbar

Click on the comment icon to show, click somewhere else and it will auto hide.

xml comments Long comments

Quote of features the listed features by the developer in readme.md

  • Ctrl+M, Ctrl+C collapses all comments (and using/Import statements)
  • Ctrl+M, Ctrl+D expands all comments and closes all other areas
  • Works with C#, VB, and XML comments
  • Can also collapse (or expand) using/import directives
  • Can be configured to collapse comments when a document is opened
Galacticai
  • 87
  • 1
  • 13