Home>

Hello.

During C # coding in VisualStudio
You can enter ///

///<summary>
///
///</summary>
///<param name = "val"></param>
///<returns></returns>


XML document comment completion like
I tried to use it but it was not completed.

Description of the specific situation

Specific examples

1 int a = 0;
2 int b = 0;
3 public int Add (int a, int b)
Four        {
5 return a + b;
6}



I entered `` /// '' on the 3rd line ↓

1 int a = 0;
2 int b = 0;
3 ///<-Entering a line break after `` /// '' doesn't complete ...
Four        
5 public int Add (int a, int b)
6 {
7 return a + b;
8}


As in the three-line comment,
"If i try to enter a line break after" /// ", no completion will be performed."
Even if you put a beat after entering "///", it will not be complemented.

Usually, or when I used it before,
When you enter "///" or after a line break

1 int a = 0;
2 int b = 0;
3 ///<summary>
Four        /// 
5 ///</summary>
6 public int Add (int a, int b)
7 {
8 return a + b;
9}


Completion like this was done.

Handling issues

Tools->Options->Text Editor->C #->Advanced Settings->Editor Help

Check the box for "Generate XML document comment when /// is entered (G)"
I switched on and off several times.
But it didn't work.

I would like to know if there are other settings that need to be set for this to work.

Supplemental information

Environment is
visualstudio2017 C # windows form application
is.

I would like to lend you wisdom.

  • Answer # 1

    I can think of two things:

    Parsing failed due to a problem with the source for commenting

    VS bug

    First, create a new project, change nothing else and try out the documentation comments for the Main method.
    If that doesn't work, it will take some time, but uninstall VS completely and reinstall it, and try it without any extensions or changing options.
    If you still can't, please contact Microsoft.