• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 419
  • Last Modified:

/// <summary></summary> by default please

I'm using VS 2010, and the default for adding the XML comments are like this:
/// <summary>
/// </summary>

I would like them to default to this:
/// <summary></summary>

manually setting this is not the end of the world, but it does get tedious.

Reason for this preference:
 - When you minimize the XML Comments, it reduces to this:
/// <summary> [...]
 - If it is on one line, you get it to minimize to this:
/// <summary>Used to process data :(</summary> [...]

  • 3
1 Solution
If you're happy to lose all of the automatically produced parameter and return values that the expanded comment gives you then I would suggest writing your own code snippet. It's really easy and would give you exactly the functionality you want.

See http://msdn.microsoft.com/en-us/library/ms165394%28VS.80%29.aspx
hpdvs2Author Commented:
While that does provide a partial solution, the key purpose of this is to reduce some of the overhead while still allowing the minimized XML comment to be easily read.

In my opinion, having to rewrite the additional comments portions would require more work than altering the initial line.

Sudhakar PulivarthiProject Lead - EngineeringCommented:
It is good to use GhostDoc Plugin for VS 2010/2005 which writes the standard comments automatically. quite interesting one!!!
U can download it from below link.
hpdvs2Author Commented:
Sudhakar, your answer worked.  I was able to use to free edition to do this.  One additional note, by default, Ghost doc is not setup like this.  I had to go in to the Tools=>Ghost Doc=>Options, then from the Ghost doc config window, select the "Options" tab, and check "Keep single line...";
hpdvs2Author Commented:
Just adding this line, to get this behavior out of the program, you need to go in to the menu Tools=>Ghost Doc=>Options, then from the Ghost doc config window, select the "Options" tab, and check "Keep single line...";

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now