11

When I use <para></para> tag in documentation (in form of <para /> as well) in Visual Studio 2015 Community Edition, I'm getting an extra blank line displayed in IntelliSense tooltip (the one which appears when typing in member name).

I've tried many variants, including but not limited to listed in the following example:

public interface IFooBar {
    ///<summary>foo<para>bar</para><para>baz</para></summary>
    void Foo();
    ///<summary>foo
    ///<para>bar</para>
    ///<para>baz</para>
    ///</summary>
    void Bar();
    ///<summary>foo<para />bar<para />baz</summary>
    void Baz();
    ///<summary>foo<para />
    ///bar
    ///<para />baz
    ///</summary>
    void Qux();    
}

but still it appears, and it is infuriating. Please, if anyone knows how to get rid of it, help me.

UPDATE (image uploaded)

example

UPDATE 2 (disambiguation with XML multiline comments in C# - what am I doing wrong?)

The question is NOT about getting new lines in XML comments, which I know how to obtain. It is about getting rid of extra new lines while using <para /> tag.

Community
  • 1
  • 1
  • Can you link a screenshot of the blank line? – Moon Jan 04 '16 at 21:08
  • @Don Sure thing, updated question with pic. – Aleksei Omelaienko Jan 04 '16 at 21:36
  • Don't use `` then? That's there to create new paragraphs. The whitespace is there by design. – Jeff Mercado Jan 04 '16 at 21:39
  • Try a `
    `, since it's a block without default formatting. Failing that, `` possibly?
    – Eris Jan 04 '16 at 22:27
  • @Eris Nope. No luck with `

    ` or `
    ` also.

    – Aleksei Omelaienko Jan 04 '16 at 22:33
  • @JeffMercado New paragraph should be basically `\r\n` and not `r\n\r\n`, shouldn't it? – Aleksei Omelaienko Jan 04 '16 at 22:34
  • Possible duplicate of [XML multiline comments in C# - what am I doing wrong?](http://stackoverflow.com/questions/2547327/xml-multiline-comments-in-c-sharp-what-am-i-doing-wrong) – Eris Jan 04 '16 at 22:36
  • @Eris Not quite. I do know how to add new lines, but I don't know how to get rid of **extra** new lines, which is never discussed in the question you mentioned nor in any of it's answers nor comments nor linked questions. – Aleksei Omelaienko Jan 04 '16 at 22:44
  • 1
    On a side note, ` `, ` ` and any combination of those don't create new lines. – Aleksei Omelaienko Jan 04 '16 at 22:45
  • 1
    As I understand it, the paragraphs are to be interpreted as separate text from the one that preceded that. Visual Studio renders that as a blank line in between. I don't think you could simply add a line break in the docs. – Jeff Mercado Jan 04 '16 at 23:09
  • @JeffMercado Well, that's a pity. I'd really like you to write that as an answer, if that's no trouble. – Aleksei Omelaienko Jan 04 '16 at 23:13
  • Here is a reference to the official values available for Visual Studio Comment Tags: [https://msdn.microsoft.com/en-us/library/5ast78ax.aspx](https://msdn.microsoft.com/en-us/library/5ast78ax.aspx) However the Paragraph tag will always add empty lines before each paragraph. Also, while special characters may be used, only normal visible ones will display like: `®` as "®" and none of the backspace or newline characters will work here. – Moon Jan 04 '16 at 23:27

1 Answers1

9

After all, it seems that there's no way to get rid of extra blank line rendered by Visual Studio when using any form of <para /> tag.

Furthermore, there seems to be no way of adding a simple line break. No, HTML tags don't work. No, &10; and &13; are not working either.

So, it basically boils down to this: either no line breaks at all, or extra line breaks.